Tag Archives: exam 3 review

Exam 3 Review – Problem 2 STEP BY STEP (Taylor Series)

Hi everyone – here is a step-by-step solution to Problem 2 from the Exam 3 Review. If you have any questions (or notice an error), please leave a comment in reply to this post.

2.  Given the differential equation y''-xy'-y=0,

a. Suppose that y(x) has a Taylor series about x=0,y(x)=\sum\limits_{n=0}^{\infty} \frac{f^{(n)}(0)}{n!} x^n=a_0+a_1 x + a_2 x^2 + a_3 x^3 + a_4 x^4 +\ldots Substitute into the differential equation and simplify by grouping together terms with similar powers of x.

We start with the assumption that y(x)= a_0+a_1 x + a_2 x^2 + a_3 x^3 + a_4 x^4 +\ldots.  Find the first and second derivatives:

  • y'(x)= a_1+2a_2x+3a_3x^2+4a_4x^3+\ldots
  • y''(x)= 2a_2+6a_3x+12a_4x^2+\ldots

Now substitute y, y' and y'' into the differential equation y''-xy'-y=0:

(2a_2+6a_3x+12a_4x^2+\ldots)-x(a_1+2a_2x+3a_3x^2+4a_4x^3+\ldots)-(a_0+a_1 x + a_2 x^2 + a_3 x^3 + a_4 x^4 +\ldots)=0

 

Get rid of parentheses (don’t forget to distribute the -x and the - in front of the second and third sets of parentheses):

2a_2+6a_3x+12a_4x^2+\ldots-a_1x-2a_2x^2-3a_3x^3-4a_4x^4-\ldots-a_0-a_1 x-a_2 x^2-a_3 x^3-a_4 x^4-\ldots=0

 

Now group together by powers of x :

(2a_2-a_0)+(6a_3x-a_1x-a_1x)+(12a_4x^2-2a_2x^2-a_2x^2)+\ldots=0

 

(Remember, there is more stuff hidden in the “\ldots” – if we wanted to, we could write down more terms ofy, y' and y'' and therefore get more terms here as well).

Finally, simplify each set of parentheses and factor out x:

(2a_2-a_0)+(6a_3-2a_1)x+(12a_4-3a_2)x^2+\ldots=0

 

Finally, we compare each term on the left with the corresponding term on the right – since the right side is zero, each of the expressions in the parentheses (which give the coefficients of the powers of x) must also be equal to zero:

  • 2a_2-a_0=0
  • 6a_3-2a_1=0
  • 12a_4-3a_2=0
  • \ldots

b. Given the initial conditions y(0)=16, y'(0)=15, find the first five terms of the Taylor series solution y(x).

We need to find the coefficients a_0, a_1, a_2, a_3, a_4, \ldots.  The first two coefficients are given by a_0 = y(0)=16 and a_1 = y(1)=15, so we have:

  • a_0 = 16
  • a_1 = 15
  • a_2 = ?
  • a_3 = ?
  • a_4 = ?
  • \ldots

To find the remaining coefficients, we use the equations we found at the end of part a) above, and solve each one for the unknown coefficient:

  • 2a_2-a_0=0 becomes a_2 = \frac{a_0}{2}
  • 6a_3-2a_1=0 becomes a_3 = \frac{a_1}{3}
  • 12a_4-3a_2=0 becomes a_4 = \frac{a_2}{4}
  • \ldots

Substituting a_0 = 16 into the first equation gives a_2 = 8.
Substituting a_1 = 15 into the second equation gives a_3 = 5.
Substituting a_2=8 into the third equation gives a_4 = 2.
\ldots

This gives us enough coefficients to determine the first five terms of the Taylor Series.  Remembering that y(x)= a_0+a_1 x + a_2 x^2 + a_3 x^3 + a_4 x^4 +\ldots, we substitute in the values of a_0, a_1, a_2, a_3, a_4 to obtain:

y(x) \approx16+15x+8x^2+5x^3+2x^4

 

NOTE: Since we have only given the first five terms of the Taylor series, the resulting expression is only an approximation of y(x) — in order to make it exactly equal to y(x) we would need to give all infinitely many terms.  This is why we replace the equals sign with the ‘wavy equals’.  (Note that I also dropped the $\ldots$ at the end).

c. Use the answer to part b to obtain an approximation of y(2)

Here, we just substitute x=2 into the expression we obtained above:

y(2) \approx16+15\cdot 2+8\cdot 2^2+5\cdot 2^3+2\cdot 2^4=150

 

Exam 3 Review – CORRECTIONS

Hi everyone,

I’ve updated the answer to Problem 1b on the Exam #3 Review.  It should be:

1b. I(t)=-234.261e^{-15t}\sin(32.0156t)

NOTE: The term involving cosine disappears because the coefficient turns out to be zero – although, based on the number of decimals you used, you may have a number very close to zero instead (rounding error).

Regards,
Prof. Reitz

Exam 3 Review is posted

Hi everyone,

The review sheet for Exam #3 is posted on the Handouts page.

NOTE: You will be provided with a two-page formula sheet for use on the exam.  This formula sheet appears on pages 2-3 of the Exam 3 Review.  The final page of the Review contains the solutions.

Let me know if you have any questions.

Regards,
Prof. Reitz