Name: Exam 3 Solutions – MATH 230, Spring 2011 Instructor: Dr. Zachary Kilpatrick No calculators. Show all your work. Simplify as much as possible. 1. (20pts) (a) Compute (or just write) the Maclaurin series for f (x) = cos x. cos x = 1 − x2 x4 x6 x8 x10 + − + − +··· 2! 4! 6! 8! 10! (b) Use part (a) to compute the Taylor series for f (x) = cos x3 centered at zero. cos x3 = 1 − x6 x12 x18 x24 x30 + − + − +··· 2! 4! 6! 8! 10! (c) Use part (b) to compute the following integral using infinite series: Z 3 x cos x dx = = = = Z x cos x3 dx x6 x12 x18 x24 x30 + − + − + · · · dx x 1− 2! 4! 6! 8! 10! Z x7 x13 x19 x25 x31 + − + − + · · · dx x− 2! 4! 6! 8! 10! x8 x14 x20 x26 x32 x2 − + − + − +··· 2 8(2!) 14(4!) 20(8!) 26(8!) 32(10!) ∞ X x6n+2 (−1)n (6n + 2)(2n)! n=0 Z 1 2. (20pts) f (x) = ln(4 + x2 ) (a) Compute f ′ (x) and f ′′ (x). 2x 4 + x2 2(4 + x2 ) − 2x(2x) 8 − 2x2 f ′′ (x) = = (4 + x2 )2 (4 + x2 )2 f ′ (x) = (b) Use part (a) to write down the first two nonzero terms of the Taylor series for f (x) centered at zero (Maclaurin series). note from (a): f (0) = ln 4; f ′ (0) = 0; f ′′ (0) = 12 , so f (x) ≈ f (0) + f ′ (0) f ′′ (0) 2 x2 x+ x = ln 4 + 1! 2! 2(2!) 2 (c) Work out the geometric series for 2x 4 + x2 x2 x4 x6 2x x x8 1 2x 1− = = + − + −··· 4 + x2 4 1 − (−x2 /4) 2 4 16 64 256 x7 x9 x x3 x5 − + − + −··· = 2 4 16 64 256 (d) Use part (c) to find a power series for f (making sure f (0) is correct). x x3 x5 x7 x9 ln(4 + x ) = − + − + − · · · dx 2 4 16 64 256 x4 x6 x8 x10 x2 − + − + −··· = C+ 2 · 2 4 · 4 6 · 16 8 · 64 10 · 256 ∞ X x2n+2 = ln 4 + (−1)n (2n + 2)4n n=0 2 Z (since when x = 0, f should be ln 4) (e) Find the interval of convergence for the power series in part (d). (−1)n+1 x2(n+1)+2 (2n + 2)4n (2n + 2)x2 2n + 2 x2 an+1 x2 = = = → (2(n + 1) + 2)4n+1 (−1)n x2n+2 (2n + 4)4 2n + 4 4 an 4 thus x2 /4 < 1 or x2 < 4 meaning −2 < x < 2 ensures convergence. when x = ±2 ∞ X (−1)n converges 2n + 2 n=0 since 1/(2n + 2) is decreasing and the series alternates. thus the interval of convergence is x ∈ [−2, 2]. 3 as n → ∞ ′ 3. (20pts) For the first order linear differential equation: y + cos x y = −3 cos2 x sin x (a) Find the associated integrating factor I(x). Z cos x dx = ln(sin x) sin x thus I(x) = eln(sin x) = sin x (b) Use the integrating factor to find the general solution. multiplying the differential equation by the integrating factor (sin x)y ′ + (cos x)y = −3 cos2 x sin x (sin xy)′ = −3 cos2 x sin x Z sin xy = (−3 cos2 x sin x)dx = cos3 x + C y = C cos3 x + sin x sin x (c) Specify the free constant of the solution with the initial condition y( π2 ) = 0. y( π2 ) = C = 0 thus y(x) = cos3 x sin x 4 4. (20pts) (a) Solve y ′′ − 4y ′ + 3y = 0 use the characteristic equation: r 2 − 4r + 3 = 0, note (r − 1)(r − 3) = 0 so r = 1, 3. thus y(x) = c1 ex + c2 e3x (b) Solve using method of undetermined coefficients: y ′′ − 4y ′ + 3y = xex − ex use the trial solution yp = (Ax2 + Bx)ex , so yp′ = (2Ax + B + Ax2 + Bx)ex and yp′′ = (2A + 2Ax + B + 2Ax + B + Ax2 + Bx)ex . thus (2A + 2B + 4Ax + Bx + Ax2 − 4B − 8Ax − 4Bx − 4Ax2 + 3Bx + 3Ax2 )ex = xex − ex 2A − 2B − 4Ax = x − 1 so A = −1/4 and B = 1/4, so yp (x) = x − x2 x e 4 adding this to the complementary solution from part (a) y(x) = c1 ex + c2 e3x + x − x2 x e 4 5 (c) Find constants of solution in part (b) using the initial conditions y(0) = 0 and y ′ (0) = 0. y(0) = c1 + c2 = 0 → y ′(x) = c1 + 3c2 + 1 =0 4 c1 = −c2 and → −2c2 + 1 4 → c2 = 1 8 and c1 = −1/8, meaning y(x) = e3x − ex x − x2 x + e 8 4 5. (20pts) A spring with a 2 kg mass and damping constant 2 has natural length 3 m and a force of 4 N is required to stretch it to a length of 4 m. (a) Compute the spring constant k. k = 4/(4 − 3) = 4/1 = 4 (b) Find the general solution for the position x(t) of the mass at time t. 2x′′ + 2x′ + 4x = 0 which has characteristic equation: 2r 2 + 2r + 4 = 0, which means √ √ −2 ± 4 − 32 7 1 r= =− ± i 4 2 2 since the root is complex, we have an underdamped spring, so the solution involves products of exponential and trigonometric functions √ !! √ ! 7 7 t + c2 sin t x(t) = e−t/2 c1 cos 2 2 6 (c) Find constants in the case the spring is started in the equilibrium position with velocity 3 m/s (at t = 0). Plot the solution x(t) versus t. starts at equilibrium position: x(0) = 0, so x(0) = c1 = 0 then, using ′ x (t) = c2 √ √ √ ! 1 −t/2 7t 3t −t/2 7 − e sin +e cos 2 2 2 2 and the initial velocity 3m/s: x′ (0) = 3 means √ 7 6 ′ x (0) = c2 =3 → c2 = √ 2 7 thus √ 6 −t/2 7t x(t) = √ e sin 2 7 (d) Find the damping constant that would produce critical damping in the spring with a 2 kg mass and spring constant k from part (a). for 2x′′ + cx′ + 4x = 0 we want the characteristic equation 2r 2 + cr + 4 = 0 to have a double root and p √ −c ± c2 − 4(2)(4) −c ± c2 − 32 = r= 4 4 √ so we want c2 − 32 = 0 meaning c2 = 32 or c = 4 2 (since c must be positive) 7 6. (Extra credit: 5pts) Solve y ′′ − y ′ = 1 characteristic equation: r 2 − r = 0 so r = 0, 1 meaning the complementary solution is yc = c1 + c2 ex notice, this means 1 solves the complementary equation, so we must pick yp = Ax as a trial solution. plugging yp = Ax into the differential equation: −A = 1 or A = −1, so y = c1 + c2 ex − x 1 7. (Extra credit: 5pts) Compute lim h→0 3h Z 3h cos(x3 )dx h plug in the infinite series from problem 1(b) for cos x3 Z 3h Z 3h 1 x6 x12 1 3 cos(x )dx = lim 1− + − · · · dx lim h→0 3h h h→0 3h h 2! 4! (3h)7 − h7 (3h)13 − h13 1 2h − + −··· = lim h→0 3h 7(2!) 13(4!) 2 37 h6 − h6 313 h12 − h12 − + −··· = lim h→0 3 21(2!) 39(4!) 2 = 3 since all terms except the first will go to zero as h → 0 8