LECTURE 13: NONHOMOGENEOUS EQUATIONS MINGFENG ZHAO October 03, 2014 Mass-Spring System: Figure 1. Mass-Spring System Let x(t) be the displacement of the mass, then mx00 + cx0 + kx = F (t) . For free motion (that is, F (t) = 0), rewrite the equation, we have x00 + 2px0 + ω02 = 0, where c p= , 2m r and ω0 = k . m The characteristic equation of x00 + 2px0 + ω02 = 0 is: r2 + 2pr + ω02 = 0. Solve r2 + 2pr + ω02 = 0, we get r1,2 = −p ± Then 1 q p2 − ω02 . 2 MINGFENG ZHAO I. Free undamped motion: c = 0 (that is, p = 0) The general solution to x00 + ω02 x = 0 is: x(t) = A cos(ω0 t) + B sin(ω0 t) . II. Overdamping: c2 − 4km > 0 (that is, p2 − ω02 > 0) The general solution to x00 + 2px0 + ω02 x = 0 is: y(t) = Aer1 t + Ber2 t , where r1 = −p − q p2 − ω02 < 0, and r2 = −p + q p2 − ω02 < 0. III. Critical damping: c2 − 4km = 0 (that is, p2 − ω02 = 0) The general solution to x00 + 2px0 + ω02 x = 0 is: y(t) = Ae−pt + Bte−pt . IV. Underdamping: c2 − 4km < 0 (that is, p2 − ω02 < 0) The general solution to x00 + 2px0 + ω02 x = 0 is: y(t) = Ae−pt cos q q ω02 − p2 t + Be−pt sin ω02 − p2 t , Example 1. Suppose that m = 2 kg and k = 8 N/m. The whole mass and spring setup is sitting on a truck that was traveling at 1 m/s. The truck crashes and hence stops. The mass was held in place 0.5 meters forward from the rest position. During the crash the mass gets loose. That is, the mass is now moving forward at 1 m/s, while the other end of the spring is held in place. The mass therefore starts oscillating. What’s is the frequency of the resulting oscillation and what is the amplitude. Let x(t) be the displacement of the mass at time t (the moving forward is in the positive direction), them the differential equation is: mx00 + kx = 2x00 + 8x = 0. By the assumption, we have x(0) = 0.5, and x0 (0) = 1. Rewrite the equation, we have x00 + 4x = 0. LECTURE 13: NONHOMOGENEOUS EQUATIONS 3 The characteristic equation of x00 + 4x = 0 is: r2 + 4 = 0. Solve r2 + 4 = 0, we have r1 = 2i, and r2 = −2i. So the general solution to 2x00 + 8x = 0 is: x(t) = A cos(2x) + B sin(2x). Then x0 (t) = −2A sin(2x) + 2B cos(2x). Since x(0) = 0.5 and x0 (0) = 1, then A = 0.5, and 2B = 1. A = 0.5, and B = 0.5 Then Therefore, the solution to 2x00 + 8x = 0, x(0) = 0.5, x0 (0) = 1 is: √ 2 π cos 2x + . 2 4 √ p 2 2 0.52 + 0.52 = . Hence the frequency is 2 = Hz , and the amplitude is 2π 2 x(t) = 0.5 cos(2x) + 0.5 sin(2x) = Example 2. Suppose you want to use a spring to weigh items. You place the mass on the spring and put it in motion. You have two reference weight 1 kg and 2 kg to calibrate your setup. You put each in motion on your spring an measure the frequency. For the 1 kg weight you measured 1.1 Hz, for the 2 kg weight you measured 0.8 Hz. a) Find the spring constant k and the damping constant c. b) Find a formula for the mass in terms of the frequency in Hz. c) For an unknown object you measure 0.2 Hz, what is the mass of the object? Suppose that you know that the mass of the unknown object is more than a kilogram. The differential equation for the mass spring system is: mx00 + cx0 + kx = 0. Rewrite the equation, we have x00 + 2px0 + ω02 x = 0, 4 MINGFENG ZHAO where c p= , 2m r and ω0 = k . m a) By the assumption, we know that the motion is undamped, and the frequency is r p q 4ω02 − 4p2 1 1 k c2 1 . · = · ω02 − p2 = · − 2π 2 2π 2π m 4m2 By the assumption, we know that r 1 k c2 = 1.1, · − 2π 1 4 · 12 and 1 · 2π r k c2 = 0.8. − 2 4 · 22 Then we have k = 4π 2 · 1.35, and c = 2π · √ 0.56 . b) Let f be the frequency corresponding to the weight m, then we have r 4π 2 · 1.35 4π 2 · 0.56 1 · − = f. 2π m 4m2 That is, we have f2 = 1.35 0.14 − 2 . m m c) If f = 0.2, then 1.35 0.14 − 2 = 0.22 m m That is, we have 0.04m2 − 1.35m + 0.14 = 0. Then m= 1.35 + √ 1.352 − 4 · 0.04 · 0.14 ≈ 33.645 . 2 · 0.04 Nonhomogeneous equations Question 1. How to solve the equation y 00 + 5y 0 + 6y = 2x + 1? Is there any relation between the nonhomogeneous equation y 00 + 5y 0 + 6y = 2x + 1 and the homogeneous equation y 00 + 5y 0 + 6y = 0? Assume we already have a particular solution yp to y 00 + 5y 0 + 6y = 2x + 1, then I. For any other solution y(x) to y 00 + 5y 0 + 6y = 2x + 1, it’s easy to see that y(x) − yp (x) is a solution to y 00 + 5y 0 + 6y = 0. LECTURE 13: NONHOMOGENEOUS EQUATIONS 5 II. On the other hand, for any solution yc (x) to y 00 + 5y 0 + 6y = 0, it’s easy to see that yc (x) + yp (x) is a solution to y 00 + 5y 0 + 6y = 2x + 1. Theorem 1. Consider the nonhomogeneous equation y 00 + p(x)y 0 + q(x)y = f (x). Let yc (x) be a complementary solution (that is, yc (x) is a solution to the homogeneous equation y 00 + p(x)y 0 + q(x)y = 0), and yp (x) be any particular solution to the nonhomogeneous equation y 00 + p(x)y 0 + q(x)y = f (x), then the general solution to the nonhomogeneous equation y 00 + p(x)y 0 + q(x)y = f (x) is: y(x) = yp (x) + yc (x). Undetermined coefficients In this course, we only consider the equation: ay 00 + by 0 + cy = f (x), where • a, b and c are constants. • f (x) is a polynomial, exponential functions, sines, cosines, and the multiplies of polynomial, exponential functions, sines and cosines. We already know how to solve the homogeneous equation ay 00 + by 0 + cy = 0, that is, we can find all complementary solutions to ay 00 + by 0 + cy = f (x), so now we only need to find a particular solution to the nonhomogeneous equation ay 00 + by 0 + cy = f (x), then we can find all general solution to the nonhomogeneous equation ay 00 + by 0 + cy = f (x). Let a, b, c be constants, consider ay 00 + by 0 + cy = f (x). The characteristic equation is: ar2 + br + c = 0. Then r1,2 = −b ± √ b2 − 4ac . 2a We have the following cases: I. When c 6= 0 and f (x) is a polynomial, a particular solution can be also a polynomial with the same degree as f (x). 6 MINGFENG ZHAO Example 3. Find the general solution to y 00 + 5y 0 + 6y = 2x + 1. The characteristic equation to y 00 + 5y 0 + 6y = 0 is : r2 + 5r + 6 = 0. Solve r2 + 5r + 6 = 0, we get r1 = −2, and r2 = −3. So the general solution to the homogeneous equation y 00 + 5y 0 + 6y = 0 is: y(x) = C1 e−2x + C2 e−3x . Let yp (x) = Ax + B for some constants A and B, then yp00 + 5yp0 + 6yp = 0 + 5A + 6(Ax + B) = 2x + 1. That is, we have (6A − 2)x + 5A + 6B − 1 = 0. So 6A − 2 = 0, and 5A + 6B − 1 = 0. So A= 1 , 3 1 and B = − . 9 1 x − is a particular solution to the nonhomogeneous equation y 00 + 5y 0 + 6y = 2x + 1. 3 9 Therefore, he general solution to the nonhomogeneous equation y 00 + 5y 0 + 6y = 2x + 1 is: Hence yp (x) = y(x) = x 1 − + C1 e−2x + C2 e−3x . 3 9 II. When f (x) = menx is an exponential function with n 6= r, a particular solution can be also an exponential function like yp (x) = Aenx for some constant A. Example 4. Find a particular solution to y 00 + 2y 0 + 3y = e5x . Let yp (x) = Ae5x for some constant A, then yp0 (x) = 5Ae5x yp00 (x) = 25Ae5x yp00 + 2yp0 + 3yp = 25Ae5x + 10Ae5x + 3Ae5x LECTURE 13: NONHOMOGENEOUS EQUATIONS = 7 e5x That is, e5x (25A + 10A + 3A) = e5x . So 38A = 1, that is, A= 1 . 38 So a particular solution to y 00 + 2y 0 + 3y = e5x is: yp (x) = 1 5x e . 38 Department of Mathematics, The University of British Columbia, Room 121, 1984 Mathematics Road, Vancouver, B.C. Canada V6T 1Z2 E-mail address: mingfeng@math.ubc.ca