Chem Differential Eq HW Solutions Fall 2011 171

Chem Differential Eq HW Solutions Fall 2011 171 - Section...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Section A.1 Linear Ordinary Differential Equations A171 Plotting the Solution First we need to learn to extract the solution from the output. Here is how it is done. First, solve the problem and call the output solution: DSolve solution 1 2 yx x 1 y ’’ x y x ,y 0 0, y ’ 0 1 , y x ,x 2x Extract the solution y(x) as follows: y x_ 1 2 yx x 1 . solution 1 2x Now you can plot the solution: Plot y x , x, 0, 2 3.5 3 2.5 2 1.5 1 0.5 0.5 1 1.5 2 Note the intial conditions on the graph: y(0)=0 and y'(0)=1. To confirm that y'(0)=1 (the slope of the graph at x=0 is 1), plot the tangent line (line with slope 1) Plot y x , x , x, 0, 2 3.5 3 2.5 2 1.5 1 0.5 0.5 1 1.5 2 ...
View Full Document

This note was uploaded on 12/22/2011 for the course MAP 3305 taught by Professor Stuartchalk during the Fall '11 term at UNF.

Ask a homework question - tutors are online