Class 12 Maths, Worked in Full Past papersGet updates
Chapter 9 · Differential Equations

Exercise 9.5 · Q13: dydx+2ytan⁡x=sin⁡x\frac{dy}{dx} + 2y\tan x = \sin x⁠, y(π3)=0y(\frac{\pi}{3}) = 0

Exercise 9.5Linear differential equations, particular solution · Section 9.4.3
The question

For each of the differential equations given in Exercises 13 to 15, find a particular solution satisfying the given condition:

13. dydx+2ytan⁡x=sin⁡x\dfrac{dy}{dx} + 2y\tan x = \sin x⁠; y=0y = 0 when x=π3x = \dfrac{\pi}{3}

Exam answer

This is of the form dydx+Py=Q\frac{dy}{dx} + Py = Q⁠, where P=2tan⁡xP = 2\tan x and Q=sin⁡xQ = \sin x⁠.

I.F.=e∫2tan⁡x dx=e2log⁡sec⁡x=elog⁡sec⁡2x=sec⁡2x\begin{aligned} \text{I.F.} &= e^{\int 2\tan x\,dx} \\ &= e^{2\log\sec x} \\ &= e^{\log\sec^2x} = \sec^2x \end{aligned}

So the solution is given by

ysec⁡2x=∫sin⁡xsec⁡2x dx+Cy\sec^2x = \int\sin x\sec^2x\,dx + C

Since sin⁡xsec⁡2x=sec⁡xtan⁡x\sin x\sec^2x = \sec x\tan x⁠,

ysec⁡2x=∫sec⁡xtan⁡x dx+C=sec⁡x+C\begin{aligned} y\sec^2x &= \int\sec x\tan x\,dx + C \\ &= \sec x + C \end{aligned}

Dividing by sec⁡2x\sec^2x⁠,

y=cos⁡x+Ccos⁡2x…(i)y = \cos x + C\cos^2x\quad\ldots(\text{i})

Putting y=0y = 0⁠, x=π3x = \frac{\pi}{3} in (i),

0=cos⁡π3+Ccos⁡2π30=12+C4C=−2\begin{aligned} 0 &= \cos\frac{\pi}{3} + C\cos^2\frac{\pi}{3} \\ 0 &= \frac{1}{2} + \frac{C}{4} \\ C &= -2 \end{aligned}

Putting C=−2C = -2 in (i),

∴\therefore The particular solution is y=cos⁡x−2cos⁡2xy = \cos x - 2\cos^2x⁠.

Want the reason behind every step, the basics and the checks?

The one idea this problem is built on

The equation is linear with P=2tan⁡xP = 2\tan x⁠. Since ∫tan⁡x dx=log⁡∣sec⁡x∣\int\tan x\,dx = \log|\sec x|⁠, the integrating factor is e2log⁡∣sec⁡x∣=sec⁡2xe^{2\log|\sec x|} = \sec^2x⁠. After multiplying, the right side sin⁡xsec⁡2x\sin x\sec^2x is just sec⁡xtan⁡x\sec x\tan x⁠, whose integral is sec⁡x\sec x⁠. That gives the family y=cos⁡x+Ccos⁡2xy = \cos x + C\cos^2x⁠; the point (π3,0)\left(\frac{\pi}{3}, 0\right) picks one member.

Given, to find, and the plan
Given
dydx+2ytan⁡x=sin⁡x\frac{dy}{dx} + 2y\tan x = \sin x⁠, and y=0y = 0 when x=π3x = \frac{\pi}{3}⁠.
To find
The particular solution through (π3,0)\left(\frac{\pi}{3}, 0\right)⁠.
Plan
(1) Read off PP and QQ⁠; note where they are defined. (2) I.F. =e∫P dx= e^{\int P\,dx}⁠. (3) Multiply and see the product rule. (4) Integrate, with one constant. (5) Solve for yy⁠. (6) Use the condition. (7) Write the particular solution. (8) Check, and see the curve.

Basics you need

1First order linear equations

dydx+Py=Q\frac{dy}{dx} + Py = Q⁠; I.F. =e∫P dx= e^{\int P\,dx}⁠; y (I.F.)=∫(Q×I.F.) dx+Cy\,(\text{I.F.}) = \int(Q\times\text{I.F.})\,dx + C (Section 9.4.3). Lesson: linear equations, the integrating factor

2∫tan⁡x dx=log⁡∣sec⁡x∣\int\tan x\,dx = \log|\sec x|

A standard result of Section 7.3.1. Then 2log⁡∣sec⁡x∣=log⁡sec⁡2x2\log|\sec x| = \log\sec^2x⁠, and elog⁡t=te^{\log t} = t⁠. Basics: exponentials

3∫sec⁡xtan⁡x dx=sec⁡x+C\int\sec x\tan x\,dx = \sec x + C

Section 7.2, formula (vi), because ddxsec⁡x=sec⁡xtan⁡x\frac{d}{dx}\sec x = \sec x\tan x⁠. Basics: every method ends with an integral

4Particular solutions

Put the given point into the general solution to find the constant (Section 9.3). Lesson: general and particular solutions

Solution

  1. Recognise the linear form: P=2tan⁡xP = 2\tan x⁠, Q=sin⁡xQ = \sin x

    The equation already has the form dydx+Py=Q\frac{dy}{dx} + Py = Q with

    P=2tan⁡x,Q=sin⁡x.P = 2\tan x, \qquad Q = \sin x.
    The equation has order 1 and degree 1: yy and dydx\frac{dy}{dx} appear to the first power, and PP⁠, QQ depend on xx only. tan⁡x\tan x needs cos⁡x≠0\cos x \ne 0⁠. The given point x=π3x = \frac{\pi}{3} lies in the interval −π2<x<π2-\frac{\pi}{2} < x < \frac{\pi}{2}⁠, and we work there.
    Section 9.4.3, step (i). Lesson: linear equations
  2. The integrating factor: sec⁡2x\sec^2x

    I.F.=e∫2tan⁡x dx=e2log⁡∣sec⁡x∣=elog⁡sec⁡2x=sec⁡2x.\begin{aligned} \text{I.F.} &= e^{\int 2\tan x\,dx} = e^{2\log|\sec x|} \\ &= e^{\log\sec^2x} = \sec^2x. \end{aligned}
    2log⁡∣sec⁡x∣=log⁡∣sec⁡x∣2=log⁡sec⁡2x2\log|\sec x| = \log|\sec x|^2 = \log\sec^2x⁠, and elog⁡t=te^{\log t} = t⁠. Because of the square there is no sign question at all: ∣sec⁡x∣2=sec⁡2x|\sec x|^2 = \sec^2x on every interval.
    Section 9.4.3, step (ii); Section 7.3.1, ∫tan⁡x dx\int\tan x\,dx⁠. Basics: exponentials
  3. Multiply by sec⁡2x\sec^2x⁠: the left side is one derivative

    sec⁡2xdydx+2sec⁡2xtan⁡x⋅y=sin⁡xsec⁡2x,ddx(ysec⁡2x)=sec⁡xtan⁡x.\begin{aligned} &\sec^2x\frac{dy}{dx} + 2\sec^2x\tan x\cdot y \\ &\quad = \sin x\sec^2x, \\ &\frac{d}{dx}\left(y\sec^2x\right) = \sec x\tan x. \end{aligned}
    By the chain rule, ddxsec⁡2x=2sec⁡x⋅sec⁡xtan⁡x=2sec⁡2xtan⁡x\frac{d}{dx}\sec^2x = 2\sec x\cdot\sec x\tan x = 2\sec^2x\tan x⁠, so the product rule gives exactly the left side. On the right, sin⁡xsec⁡2x=sin⁡xcos⁡x⋅1cos⁡x=tan⁡xsec⁡x\sin x\sec^2x = \frac{\sin x}{\cos x}\cdot\frac{1}{\cos x} = \tan x\sec x⁠.
    Product and chain rules (Chapter 5, Sections 5.3 and 5.3.1). Basics: (y · g)′ = g(y′ + Py)
  4. Integrate, with one constant

    ysec⁡2x=∫sin⁡xsec⁡2x dx+C=∫sec⁡xtan⁡x dx+C=sec⁡x+C.\begin{aligned} y\sec^2x &= \int\sin x\sec^2x\,dx + C \\ &= \int\sec x\tan x\,dx + C \\ &= \sec x + C. \end{aligned}
    This is y (I.F.)=∫(Q×I.F.) dx+Cy\,(\text{I.F.}) = \int(Q\times\text{I.F.})\,dx + C⁠. The CC is the one arbitrary constant of the general solution.
    Section 9.4.3, step (iii); Section 7.2, formula (vi). Basics: one constant for order 1
  5. Solve for yy⁠: the general solution

    y=cos⁡x+Ccos⁡2x.…(1)y = \cos x + C\cos^2x.\quad\ldots(1)
    Divide by sec⁡2x\sec^2x⁠, that is, multiply by cos⁡2x\cos^2x⁠: sec⁡x⋅cos⁡2x=cos⁡x\sec x\cdot\cos^2x = \cos x⁠. This is the general solution, a family of curves with one constant.
    Section 9.4.3: the general solution. Lesson: Exercise 9.5 player
  6. Use the condition: y=0y = 0 when x=π3x = \frac{\pi}{3}

    Putting x=π3x = \frac{\pi}{3}⁠, y=0y = 0 in (1):

    0=cos⁡π3+Ccos⁡2π3=12+C4C=−2.\begin{aligned} 0 &= \cos\frac{\pi}{3} + C\cos^2\frac{\pi}{3} = \frac{1}{2} + \frac{C}{4} \\ C &= -2. \end{aligned}
    cos⁡π3=12\cos\frac{\pi}{3} = \frac{1}{2}⁠, so cos⁡2π3=14\cos^2\frac{\pi}{3} = \frac{1}{4}⁠. Multiplying 0=12+C40 = \frac{1}{2} + \frac{C}{4} by 4 gives 0=2+C0 = 2 + C⁠.
    Section 9.3: a particular solution. Lesson: general and particular solutions
  7. The particular solution

    y=cos⁡x−2cos⁡2x.y = \cos x - 2\cos^2x.
    Put C=−2C = -2 in (1). The formula is defined for every xx⁠, but the equation is not defined where cos⁡x=0\cos x = 0⁠; the solution through (π3,0)\left(\frac{\pi}{3}, 0\right) lives on −π2<x<π2-\frac{\pi}{2} < x < \frac{\pi}{2}⁠.
    Section 9.3: a particular solution. Lesson: Examples 14 to 18
  8. Check by substituting back, and see the curve

    From y=cos⁡x−2cos⁡2xy = \cos x - 2\cos^2x⁠: dydx=−sin⁡x+4sin⁡xcos⁡x\frac{dy}{dx} = -\sin x + 4\sin x\cos x⁠. And

    2ytan⁡x=2(cos⁡x−2cos⁡2x)sin⁡xcos⁡x=2sin⁡x−4sin⁡xcos⁡x.\begin{aligned} 2y\tan x &= 2(\cos x - 2\cos^2x)\frac{\sin x}{\cos x} \\ &= 2\sin x - 4\sin x\cos x. \end{aligned}

    Adding, dydx+2ytan⁡x=sin⁡x\frac{dy}{dx} + 2y\tan x = \sin x⁠, the given equation. At x=π3x = \frac{\pi}{3}⁠: y=12−2⋅14=0y = \frac{1}{2} - 2\cdot\frac{1}{4} = 0⁠.

    X Y X′ Y′ (π/3, 0) x = −π/2 x = π/2 O
    Slope field of dydx=sin⁡x−2ytan⁡x\frac{dy}{dx} = \sin x - 2y\tan x for −π2<x<π2-\frac{\pi}{2} < x < \frac{\pi}{2}⁠, with equal scales, and the particular solution y=cos⁡x−2cos⁡2xy = \cos x - 2\cos^2x through (π3,0)\left(\frac{\pi}{3}, 0\right)⁠. The dashed lines x=±π2x = \pm\frac{\pi}{2}⁠, where cos⁡x=0\cos x = 0⁠, bound the interval on which the solution lives.
    The 4sin⁡xcos⁡x4\sin x\cos x terms cancel and −sin⁡x+2sin⁡x=sin⁡x-\sin x + 2\sin x = \sin x⁠, so the formula satisfies the equation wherever cos⁡x≠0\cos x \ne 0⁠, and it passes through the given point.
    A solution makes L.H.S. = R.H.S. (Section 9.3). Basics: a rule for slopes
Result

The general solution is y=cos⁡x+Ccos⁡2xy = \cos x + C\cos^2x⁠, and the particular solution with y=0y = 0 when x=π3x = \frac{\pi}{3} is y=cos⁡x−2cos⁡2xy = \cos x - 2\cos^2x (on −π2<x<π2-\frac{\pi}{2} < x < \frac{\pi}{2}⁠). (Textbook answer: y=cos⁡x−2cos⁡2xy = \cos x - 2\cos^2x⁠.)

Check it with numbers

Take x=0.5x = 0.5⁠: y(0.5)≈−0.6627197y(0.5) \approx -0.6627197⁠. With sin⁡0.5≈0.4794255\sin 0.5 \approx 0.4794255 and tan⁡0.5≈0.5463025\tan 0.5 \approx 0.5463025⁠, the equation gives dydx=sin⁡x−2ytan⁡x≈1.20352\frac{dy}{dx} = \sin x - 2y\tan x \approx 1.20352⁠.

The curve itself: y(0.501)≈−0.6615155868y(0.501) \approx -0.6615155868 and y(0.499)≈−0.6639226176y(0.499) \approx -0.6639226176⁠. They differ by 0.00240703080.0024070308⁠, so

0.00240703080.002≈1.20352.\frac{0.0024070308}{0.002} \approx 1.20352.
Common mistakes
  1. Taking the I.F. as e2tan⁡xe^{2\tan x} or sec⁡x\sec x⁠; it is e∫2tan⁡x dx=e2log⁡∣sec⁡x∣=sec⁡2xe^{\int 2\tan x\,dx} = e^{2\log|\sec x|} = \sec^2x⁠.
  2. Writing ∫tan⁡x dx=log⁡∣cos⁡x∣\int\tan x\,dx = \log|\cos x|; it is −log⁡∣cos⁡x∣=log⁡∣sec⁡x∣-\log|\cos x| = \log|\sec x|⁠.
  3. Integrating sin⁡xsec⁡2x\sin x\sec^2x the hard way. It is sec⁡xtan⁡x\sec x\tan x⁠, a standard integral.
  4. Dividing only sec⁡x\sec x by sec⁡2x\sec^2x and leaving +C+C⁠: the general solution is y=cos⁡x+Ccos⁡2xy = \cos x + C\cos^2x⁠.
What to take away
  1. P=ktan⁡xP = k\tan x gives I.F. sec⁡kx\sec^kx⁠; P=kcot⁡xP = k\cot x gives sin⁡kx\sin^kx⁠.
  2. Simplify Q×I.F.Q\times\text{I.F.} before integrating: here it became a standard form.
  3. For a particular solution: general solution first, then the point fixes CC⁠, then check.

Every fact used, and where it comes from

FactUsed inSource
Linear equation; I.F. =e∫P dx= e^{\int P\,dx}⁠; y (I.F.)=∫(Q×I.F.) dx+Cy\,(\text{I.F.}) = \int(Q\times\text{I.F.})\,dx + CSteps 1, 2, 4Section 9.4.3, steps (i) to (iii) (Lesson)
Order and degreeStep 1Sections 9.2.1 and 9.2.2 (Lesson)
∫tan⁡x dx=log⁡∣sec⁡x∣+C\int\tan x\,dx = \log|\sec x| + CStep 2Section 7.3.1 (Basics)
Product and chain rulesSteps 3, 8Chapter 5, Sections 5.3 and 5.3.1 (Basics)
∫sec⁡xtan⁡x dx=sec⁡x+C\int\sec x\tan x\,dx = \sec x + CStep 4Section 7.2, formula (vi) (Basics)
Particular solution from a given point; cos⁡π3=12\cos\frac{\pi}{3} = \frac{1}{2}Step 6Section 9.3 (Lesson)
Substituting back into the equationStep 8Section 9.3 (Lesson)
Found an error, or want more?

Tell us if something on this page is wrong or unclear, or if you would like a fuller explanation, another method or a new feature. Send feedback on this problem →