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]

DSolve Solution

Mathematica produces a solution wrapped in braces in the form of a replacement rule for y[x]. We want to extract just the right-hand side of this replacement rule, and to shed the braces. 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

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