Delta Banner

Mathematics & Science Learning Center
Computer Laboratory

 

Applications of Differential Equations

A Suspended Wire

(continued from last page...)

Your Mathematica session should have gone something like this:

ansol=DSolve[{y''[x]==(0.5/40)*Sqrt[1+(y'[x])^2], y[0]==0, y'[0]==0}, y[x], x]

Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information. >>

Mathematica DE Solutions

Mathematica produces three solutions, though two of them appear to be complex, since they involve the imaginary constant, i. Since we're only interested in real solutions, the first solution listed is the one we wish to extract from this set. This may be done by using what may be called, the "[[1,1,2]] trick."

Use it now, by issuing the command:

ansol1 = ansol[[1, 1, 2]]

which tells Mathematica to take ansol's first row, first column, second part, and read it into ansol1

Let's go and see what you should have gotten...


Compass If you're lost, impatient, want an overview of this laboratory assignment, or maybe even all three, you can click on the compass button on the left to go to the table of contents for this laboratory assignment.
 
 

ODE Laboratories: A Sabbatical Project by Christopher A. Barker

©2009 San Joaquin Delta College, 5151 Pacific Ave., Stockton, CA 95207, USA
e-mail:
cbarker@deltacollege.edu