Exercise sheet 8 not to be handed in solutions dy − y = e2x . 1. Solve dx Using integrating factors. Multiply by M to obtain M dy − M y = M e2x . dx (1) We want the equation to be equal to (M y)0 = M e2x , (2) which by the product rule is M dy dM + y = M e2x . dx dx (3) Comparing (1) and (3) we then see that we must choose the integrating factor M to satisfy dM = −M. dx To solve this we could use that it is a separable equation, but here we easily see a solution to be M = e−x . So our equation for y becomes e−x dy − e−x y = ex , dx when we write it in the form of (3), or more appropriately it becomes (e−x y)0 = ex when we write it in the form of (2). We simply integrate this last equation to obtain e−x y = ex + C (remember to put the constant in at this point) and solve for y to obtain y = e2x + Cex . Using variation of parameters. We first solve the equation dz − z = 0. dx This can be done by separation of variables, but in this case it is easy enough to see that z = ex is a solution. We then substitute y = Cex into our equation to obtain an equation for C. Using the product rule we obtain C 0 ex + Cex − Cex = e2x . Two terms cancel each other (as always happens when using this method) so that we obtain C 0 ex = e2x . We divide by ex to obtain C 0 = ex and integrate to obtain C = ex + K. Since y = Cex we then have y = e2x + Kex . Using the method of undetermined coefficients. We first solve the equation dz dx − z = 0. This can be done by separation of variables, but in this case it is easy enough to see that z = Cex is the general solution. We then try a solution of the same form as the right-hand side, in this case we try y = Ae2x . Substituting this into the equation gives 2Ae2x − Ae2x = e2x . It follows that A = 1, so that y = e2x is a solution and y = e2x + Cex is the general solution. dy 2. Solve dx + y tan x = sin 2x with initial condition y(0) = 1. Using integrating factors. Multiply by M to obtain M dy + yM tan x = M sin 2x. dx (4) We want the equation to be equal to (M y)0 = M sin 2x, (5) which by the product rule is M dy dM + y = M sin 2x. dx dx (6) Comparing (4) and (6) we then see that we must choose the integrating factor M to satisfy dM = M tan x. dx To solve this we use that this is a separable equation. We separate variables to obtain Z Z dM = tan x dx. M 2 We now carry out the integrations to obtain (we can omit the constant since we only need one integrating factor): ln |M | = − ln | cos x|, (7) sin x where we use that tan x = cos x and used substitution with u = cos x so du that dx = − sin x to obtain Z Z −1 tan x dx = du = − ln |u| + C = − ln | cos x| + C, u and we subsequently take C = 0 to obtain the simplest integration factor. Using the logarithmic rules we write (7) as 1 , ln |M | = ln | cos x| so that we see that M = y becomes 1 cos x is an integrating factor. So our equation for 1 dy tan x sin 2x −y = , cos x dx cos x cos x when we write it in the form of (3), or more appropriately it becomes ( 1 sin 2x y)0 = . cos x cos x when we write it in the form of (2). We use the double angle formula for the sine to write the right-hand side as 2 sin x, so that we obtain the equation 1 ( y)0 = 2 sin x, cos x which we simply integrate to obtain 1 y = −2 cos x + C. cos x (remember to put the constant in at this point) and solve for y to obtain y = −2 cos2 x + C cos x. We now determine the arbitrary constant from the initial value. We have y(0) = −2 + C = 1, so that C = 3. The unique solution then is y = −2 cos2 x + 3 cos x. Using variation of parameters. We first solve the equation dz + z tan x = 0. dx 3 This can be done by separation of variables as follows. Z Z dz = − tan x dx. z We obtain from this ln |z| = ln | cos x|, (8) sin x where we use that tan x = cos x and used substitution with u = cos x so du that dx = − sin x to obtain Z Z 1 − tan x dx = du = ln |u| + K = ln | cos x| + K, u and we subsequently take K = 0 to obtain the simplest solution. From (8) it follows that z = cos x. We then substitute y = C cos x into our equation to obtain an equation for C. Using the product rule we obtain C 0 cos x − C sin x + C cos x tan x = sin 2x. Two terms cancel each other (as always happens when using this method) so that we obtain C 0 cos x = sin 2x. We divide by cos x and use the double angle formula for the sine to obtain C 0 = 2 sin x and integrate to obtain C = −2 cos x + K. Since y = C cos x we then have y = −2 cos2 x+K cos x. We now determine the arbitrary constant from the initial value. We have y(0) = −2 + K = 1, so that K = 3. The unique solution then is y = −2 cos2 x + 3 cos x. The method of undetermined coefficients is not really applicable in this case since tan x appears as the coefficient of y in the differential equation (this coefficient really needs to be constant for the method of undetermined coefficients to work properly). 4
© Copyright 2026 Paperzz