Math 53 Homework due Wednesday, March 9 SOLUTIONS 1. Do Section 8.8, problems 11,, 15, 17 (these problems have to do with Taylor s Inequality, and they are very similar to what we did on the last homework. Use Mathematica to do the plots, being careful to use an appropriate PlotRange.. Do Section 8.8, problems 4 and 5. In these problems, find a d so that the given approximation is within the desired error over the interval ( d, d (similar to problem 5a from last week. 3. (a Find the first four terms of the general power series solution to y = y, centered at x = 0. (b Find the first four terms of the particular power series solution from (a that satisfies y(0 =. (c Use Mathematica to plot a graph of the degree 4 Taylor polynomial you found in (b. (d The differential equation y = y is separable, so it can be solved exactly. Find the particular solution that satisfies y(0 = (review Chapter 7.3 of the textbook if necessary. (e Graph the degree 4 Taylor polynomial and your exact solution on the same set of axes. Make sure to label which graph is which. Write y = a 0 + a 1 x + a x + a 3 x 3 +. Then y = y becomes a 1 + a x + 3a 3 x + = (a 0 + a 1 x + a x + a 3 x 3 + = a 0 + a 0 a 1 x + (a 0 a + a 1x + (a 0 a 3 + a 1 a x 3 + We find the equations a 1 = a 0, a = a 0 a 1, 3a 3 = a 0 a + a 1. Solving these gives a 1 = a 0, a = a 3 0, a 3 = a 4 0 and so our general power series solution is y = a 0 + a 0x + a 3 0x + a 4 0x 3 + For (b, if we have y(0 = then plugging into the above this says = a 0, so the particular solution is y = + 4x + 8x + 1x 3 +
For (c, we would write dy dx = y and then rearrange to get dy y = dx. Integerating gives 1 = x + C, or y = 1. The intial value = y(0 gives C = 1, y x+c and so y = 1 x 1 = x 1 = 1 x. Note that this agrees with our power series solution. The following plot is the solution to (d. The Taylor series is the curve that crosses the vertical line, whereas the true solution has the vertical line as an asymptote. 0 15 10 5 0.0 0. 0.4 0. 0.8 1.0 4. (a The differential equation y = xy + 1 is not separable, and so it is harder to find an exact solution. Find the first five terms of the power series solution, centered at 0, that satisfies y(0 = 1. (b Mathematica can solve differential equations numerically, which means it will not give you a formula for the solution but can draw the graph. Try the following commands: sol = NDSolve[ {y [x]==x*y[x]+1, y[0]==1},y,{x,0,5}] Plot[y[x]/.sol,{x,0,5}] The first command generates a bunch of points on the graph of the solution of the differential equation (in the range where x is between 0 and, and the second command plots the graph. Finally, use the following command to plot your solution from (a on the same axes as Mathematica s numerical solution: Plot[{y[x]/.sol, INSERT YOUR FUNCTION HERE },{x,0,5}] If you did (a correctly, the functions should be very close until about x = 1.5. You can change the range of x-values in the plot to get a better look, if you desire. Page
Set y = a 0 + a 1 x + a x +. Plugging into y = xy + 1 gives a 1 + a x + 3a 3 x + 4a 4 x 3 + = 1 + a 0 x + a 1 x + a x 3 + a 3 x 4 + So we get a 1 = 1, a = 1 a 0, a 3 = 1 3 a 1 = 1 3, a 4 = 1 4 a = 1 8 a 0. We get y = a 0 + x + 1 a 0x + 1 3 x3 + 1 8 a 0x 4 + The initial value y(0 = 1 tells us a 0 = 1, and so the particular solution is y = 1 + x + 1 x + 1 3 x3 + 1 8 x4 + Here is the graph showing the degree 4 Taylor approximation in relation to the true solution (the true solution is the one that grows much faster: 300 50 00 150 100 50 0 1 3 4 5 5. Now consider the second order differential equation y + xy + y = 0, with initial values y(0 =, y (0 = 1. (a Find the first five terms of a power series solution centered at 0, and plot the graph of this degree 5 polynomial using Mathematica. (b Have Mathematica generate a numerical solution to the differential equation using the following command: sol=ndsolve[{ y [x]+x*y [x]+y[x]==0, y[0]==, y [0]==1},y,{x,0,}] Then have Mathematica plot the graph as well as your approximate solution from (a on the same set of axes, just as we did in the previous problem. You might have to play around with the PlotRange, as well as the range for the x-values, in order to get a nice graph. If you did (a correctly, it should be very close to the true solution throughout the interval (0, 1.. We set y = a 0 + a 1 x + a x + and compute y = a 1 + a x + 3a 3 x + 4a 4 x 3 + Page 3
Then y = a + a 3 x + a 4 x + y + xy + y = (a + a 0 + (a 3 + a 1 x + (a 4 + 3a x + (0a 5 + 4a 3 x 3 + To have y + xy + y = 0 we must have all the above coefficients equal to zero. This leads to a = a 0, a 3 = a 1 3, a 4 = a 4 = a 0 8, a 5 = a 3 5 = a 1 15. The first six terms in our general solution are therefore y = a 0 + a 1 x a 0 x a 1 3 x3 + a 0 8 x4 + a 5 15 x5 + The equations y(0 = and y (0 = 1 give us a 0 = and a 1 = 1, so the particular solution is y = + x x x3 + x4 4 + x5 15 + The following plot is the solution to (b. The Taylor approximation is the curve that moves off to infinity as x gets large. 8 4 0 1 3 4 5. Find the first five terms of the general power series solution to (1 xy +y = 0, centered at 0. Then find the particular solution that satisfies y(0 = 1, y (0 = 3. If y = a n x n then y = a + a 3 x + a 4 x + and (1 xy + y = (a + a 0 + (a 3 a + a 1 x + (a 4 a 3 + a x + Since this must equal zero, we get the equations a = a 0, a 3 = a a 1 = a 0 a 1, a 4 = a 3 a = a 0 a 1 + a 0 = a 0 a 1 4 Page 4
The general solution is y = a 0 + a 1 x a 0 x ( a0 + a 1 x 3 ( a0 + a 1 4 x 4 + The initial values y(0 = 1 and y (0 = 3 give a 0 = 1, a 1 = 3 and so we get y = 1 + 3x 1 x 3 x3 7 4 x4 + 7. Find the first five terms of the power series solution to xy + y + xy = 0 centered at x = 1, satisfying the intial values y(1 = 0, y (1 =. Since we are centered at 1 we write Then y = a 0 + a 1 (x 1 + a (x 1 + a 3 (x 1 3 + y = a 1 + a (x 1 + 3a 3 (x 1 + y = a + a 3 (x 1 + a 4 (x 1 + 0a 5 (x 1 3 + In our original differential equation, we change each x to 1 + (x 1. So the differential equation is [1 + (x 1]y + y + [1 + (x 1]y = 0. Plugging in our formulas for y and its derivatives, we get 0 = (a +a 1 +a 0 +(a 3 +a +a +a 1 +a 0 (x 1+(a 4 +a 3 +3a 3 +a +a 1 (x 1 + Equating the coefficients to zero, we get the equations Solving recursively, we get 0 = a + a 1 + a 0 0 = a 3 + 4a + a 1 + a 0 0 = a 4 + 9a 3 + a + a 1. a = a 1 + a 0 ( ( 4a + a 1 + a 0 a1 a 0 + a 1 + a 0 a 3 = = a 4 = 9a ( 3 + a + a 3 1 = (a 1 + a 0 a 0+a 1 + a 1 = a 1 + a 0 = a 1 + a 0. Page 5
The general solution is therefore ( ( a0 + a 1 y = a 0 + a 1 (x 1 (x 1 a0 + a 1 + (x 1 3 + ( a0 a 1 The initial values give us a 0 = 0, a 1 =, and so the particular solution is y = (x 1 (x 1 + 1 3 (x 13 1 3 (x 14 + (x 1 4 + Alternate solution: Since we were not asked to find the general solution in this problem, we could save some time and reason a bit differently. We were give y(1 = 0 and y (1 =. Plugging x = 1 into the differential equation gives 1 y (1 + y (1 + 1 y(1 = 0, or y (1 + + 0 = 0. So y (1 =. Taking derivatives of the differential equation gives Plugging in x = 1 gives So y (1 =. xy + y + y + y + xy = 0. y (1 + y (1 + y (1 + y(1 = 0, or y (1 4 + + 0 = 0. We need to go one more step to find y (4 (1. Taking derivatives yet again gives Plugging in x = 1 gives xy (4 + y + y + y + y + xy = 0. y (4 (1 + 3y (1 + y (1 + y (1 = 0, or y (4 (1 + + 4 + = 0. So y (4 (1 = 8. The Taylor series for y centered at x = 1 is therefore y = y(1 + y (1(x 1 + y (1 (x 1 + y (1 (x 1 3 + y(4 (1 4 (x 14 = 0 + (x 1 (x 1 + 1 3 (x 13 1 3 (x 14 + Page