{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Chem Differential Eq HW Solutions Fall 2011 195

# Chem Differential Eq HW Solutions Fall 2011 195 - Out[85]=...

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

Section A.5 The Power Series Method, Part II A195 The following notebook illustrates how we can use Mathematica to solve a differential equations with poser series. The solution is y and we will solve for the first 10 coefficients. Let's define a partial sum of the Taylor series solution (degree 3) and set y[0]=1: In[82]:= seriessol Series y x , x,0, 3 . y 0 1 Out[82]= 1 y 0 x 1 2 y 0 x 2 1 6 y 3 0 x 3 O x 4 Next we set equations based on the given differential equation y'+y=0. In[83]:= leftside D seriessol,x seriessol rightside 0 equat LogicalExpand leftside rightside Out[83]= 1 y 0 y 0 y 0 x y 0 2 1 2 y 3 0 x 2 O x 3 Out[84]=
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Out[85]= 1 y 0 && y y 0 && y 2 1 2 y 3 This gives you a set of equations in the coefficients that Mathematica can solve In[86]:= seriescoeff Solve equat Out[86]= y 1, y 1, y 3 1 Next, we substitute these coefficients in the series solution. This can be done as follows In[87]:= seriessol . seriescoeff 1 Out[87]= 1 x x 2 2 x 3 6 O x 4 To get a partial sum without the Big O, use In[88]:= Normal seriessol . seriescoeff 1 Out[88]= 1 x x 2 2 x 3 6...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online