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

Exercise 9.3 · Q14: Particular solution of dydx=ytan⁡x\frac{dy}{dx} = y\tan x⁠, y(0)=1y(0) = 1

Exercise 9.3Variables separable, particular solution · Sections 9.3 and 9.4.1
The question

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

14. dydx=ytan⁡x\dfrac{dy}{dx} = y\tan x⁠; y=1y = 1 when x=0x = 0

Exam answer

Given dydx=ytan⁡x\frac{dy}{dx} = y\tan x⁠. Separating the variables (y≠0y \ne 0⁠),

dyy=tan⁡x dx\frac{dy}{y} = \tan x\,dx

Integrating both sides,

log⁡∣y∣=log⁡∣sec⁡x∣+log⁡∣C∣y=Csec⁡x…(i)\begin{aligned} \log|y| &= \log|\sec x| + \log|C| \\ y &= C\sec x\quad\ldots(\text{i}) \end{aligned}

Putting x=0x = 0⁠, y=1y = 1 in (i): 1=Csec⁡0=C1 = C\sec 0 = C⁠, so C=1C = 1⁠.

∴\therefore y=sec⁡xy = \sec x (−π2<x<π2)\left(-\dfrac{\pi}{2} < x < \dfrac{\pi}{2}\right) is the particular solution.

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

The one idea this problem is built on

The right side is a function of xx times a function of yy⁠, so dividing by yy separates the variables. Both sides then integrate to logarithms, and writing the constant as log⁡∣C∣\log|C| lets the logs combine into the simple family y=Csec⁡xy = C\sec x⁠. The condition at x=0x = 0 gives C=1C = 1⁠.

Given, to find, and the plan
Given
dydx=ytan⁡x\frac{dy}{dx} = y\tan x⁠, and y=1y = 1 when x=0x = 0⁠.
To find
The particular solution: no arbitrary constant, passing through (0,1)(0, 1)⁠.
Plan
(1) Separate, noting where this is allowed. (2) Integrate, with the constant written as log⁡∣C∣\log|C|⁠. (3) Remove the logs to get y=Csec⁡xy = C\sec x⁠. (4) Use the condition. (5) Check by substituting back, and draw the family.

Basics you need

1Variables separable

If dydx=g(x) h(y)\frac{dy}{dx} = g(x)\,h(y) with h(y)≠0h(y) \ne 0⁠, then ∫dyh(y)=∫g(x) dx\int\frac{dy}{h(y)} = \int g(x)\,dx (Section 9.4.1). Here g(x)=tan⁡xg(x) = \tan x and h(y)=yh(y) = y⁠. Lesson: separate, then integrate

2Two standard integrals

∫dyy=log⁡∣y∣+C\int\frac{dy}{y} = \log|y| + C (Section 7.2, formula (xii)) and ∫tan⁡x dx=log⁡∣sec⁡x∣+C\int\tan x\,dx = \log|\sec x| + C (Section 7.3.1). Basics: every method ends with an integral

3The constant as a logarithm

Any real constant can be written as log⁡∣C∣\log|C| with C≠0C \ne 0⁠; then log⁡∣y∣=log⁡∣Csec⁡x∣\log|y| = \log|C\sec x| gives ∣y∣=∣Csec⁡x∣|y| = |C\sec x|⁠. Basics: one constant, one condition

4Particular solution

Put the given xx and yy into the general solution and solve for the constant (Section 9.3). Lesson: general and particular solutions

Solution

  1. Separate the variables

    This is a first order equation of degree 1 (a polynomial of degree 1 in dydx\frac{dy}{dx}⁠). For y≠0y \ne 0⁠, divide by yy and multiply by dxdx⁠:

    dyy=tan⁡x dx.\frac{dy}{y} = \tan x\,dx.
    The equation has the form dydx=g(x) h(y)\frac{dy}{dx} = g(x)\,h(y) with g(x)=tan⁡xg(x) = \tan x⁠, h(y)=yh(y) = y⁠. Dividing by h(y)h(y) needs y≠0y \ne 0⁠; the constant function y=0y = 0 also solves the equation, but it does not pass through (0,1)(0, 1)⁠, so we lose nothing. tan⁡x\tan x is defined except at odd multiples of π2\frac{\pi}{2}⁠; the condition is at x=0x = 0⁠, so we work on −π2<x<π2-\frac{\pi}{2} < x < \frac{\pi}{2}⁠.
    Section 9.4.1: separate, then integrate. Lesson: separate, then integrate
  2. Integrate both sides, with one constant

    ∫dyy=∫tan⁡x dxlog⁡∣y∣=log⁡∣sec⁡x∣+log⁡∣C∣.\begin{aligned} \int\frac{dy}{y} &= \int\tan x\,dx \\ \log|y| &= \log|\sec x| + \log|C|. \end{aligned}
    Both integrals are standard. The constants of the two sides combine into one, and we write it as log⁡∣C∣\log|C| (C≠0C \ne 0⁠): as CC runs over the nonzero numbers, log⁡∣C∣\log|C| takes every real value, so nothing is lost, and the next step becomes a one-liner. One constant for a first order equation.
    Section 7.2, formula (xii); Section 7.3.1, ∫tan⁡x dx\int\tan x\,dx⁠. Basics: every method ends with an integral
  3. Remove the logarithms

    log⁡∣y∣=log⁡∣Csec⁡x∣⇒ ∣y∣=∣Csec⁡x∣⇒ y=Csec⁡x.\begin{aligned} \log|y| &= \log|C\sec x| \\ \Rightarrow\ |y| &= |C\sec x| \\ \Rightarrow\ y &= C\sec x. \end{aligned}
    log⁡m+log⁡n=log⁡mn\log m + \log n = \log mn⁠, and log⁡\log is one to one, so the moduli are equal. Then y=±Csec⁡xy = \pm C\sec x⁠; the sign can be absorbed into CC⁠, which may be any nonzero number. This is the general solution: the family y=Csec⁡xy = C\sec x⁠.
    Laws of logarithms; renaming the constant. Basics: one constant, one condition
  4. Use the condition to find CC

    Put x=0x = 0⁠, y=1y = 1⁠: 1=Csec⁡0=C⋅11 = C\sec 0 = C\cdot 1⁠, so C=1C = 1 and

    y=sec⁡x,−π2<x<π2.y = \sec x,\qquad -\frac{\pi}{2} < x < \frac{\pi}{2}.
    sec⁡0=1cos⁡0=1\sec 0 = \frac{1}{\cos 0} = 1⁠. One condition fixes the one constant. The solution lives on the interval through x=0x = 0 on which sec⁡x\sec x is defined; it cannot be continued past x=±π2x = \pm\frac{\pi}{2}⁠, where sec⁡x\sec x becomes infinite.
    Section 9.3: a particular solution gives the constant a value. Lesson: general and particular solutions
  5. Check: substitute back, and see the family

    ddxsec⁡x=sec⁡xtan⁡x=ytan⁡x\frac{d}{dx}\sec x = \sec x\tan x = y\tan x⁠, so L.H.S. = R.H.S. At x=0x = 0⁠: y=sec⁡0=1y = \sec 0 = 1⁠.

    X Y X′ Y′ (0, 1) y = sec x C = 2 C = −1 x = π/2 x = −π/2 O
    The particular solution y=sec⁡xy = \sec x (bold) through (0,1)(0, 1)⁠, with two other members of the family y=Csec⁡xy = C\sec x⁠: C=2C = 2 and C=−1C = -1 (thin). Drawn with equal scales on −π2<x<π2-\frac{\pi}{2} < x < \frac{\pi}{2}⁠; the dashed lines x=±π2x = \pm\frac{\pi}{2} are where every member becomes infinite.
    Substituting back is the definition of a solution (Section 9.3). The picture shows the whole family; only the bold curve passes through (0,1)(0, 1)⁠, and its lowest point is exactly there, where the slope sec⁡0tan⁡0\sec 0\tan 0 is 0.
    ddxsec⁡x=sec⁡xtan⁡x\frac{d}{dx}\sec x = \sec x\tan x (Chapter 5). Basics: y′ is the slope
Result

The particular solution is y=sec⁡xy = \sec x⁠, for −π2<x<π2-\frac{\pi}{2} < x < \frac{\pi}{2}⁠. (Textbook answer: y=sec⁡xy = \sec x⁠.)

Check it with numbers

At x=0.5x = 0.5⁠: y=sec⁡0.5≈1.1394939y = \sec 0.5 \approx 1.1394939 and tan⁡0.5≈0.5463025\tan 0.5 \approx 0.5463025⁠, so the equation asks for the slope ytan⁡x≈0.6225084y\tan x \approx 0.6225084⁠.

The curve itself: y(0.501)≈1.1401173y(0.501) \approx 1.1401173 and y(0.499)≈1.1388723y(0.499) \approx 1.1388723⁠, so

1.1401173−1.13887230.002≈0.6225.\begin{aligned} &\frac{1.1401173 - 1.1388723}{0.002} \\ &\approx 0.6225. \end{aligned}
Common mistakes
  1. ∫tan⁡x dx=sec⁡2x\int\tan x\,dx = \sec^2x⁠. That is the derivative of tan⁡x\tan x⁠; the integral is log⁡∣sec⁡x∣\log|\sec x|⁠.
  2. Adding CC after removing the logs: y=sec⁡x+Cy = \sec x + C is wrong. A constant added to logs becomes a factor.
  3. Forgetting the interval. sec⁡x\sec x is not defined at x=±π2x = \pm\frac{\pi}{2}⁠, so the solution through (0,1)(0, 1) stays between them.
What to take away
  1. When both sides integrate to logs, write the constant as log⁡∣C∣\log|C| and combine.
  2. dydx=y g(x)\frac{dy}{dx} = y\,g(x) always gives y=Ce∫g dxy = Ce^{\int g\,dx}⁠; here elog⁡∣sec⁡x∣=∣sec⁡x∣e^{\log|\sec x|} = |\sec x|⁠.
  3. Check the particular solution in the equation and at the given point.

Every fact used, and where it comes from

FactUsed inSource
Variables separable: separate, then integrateStep 1Section 9.4.1 (Lesson)
∫dyy=log⁡∣y∣+C\int\frac{dy}{y} = \log|y| + C⁠; ∫tan⁡x dx=log⁡∣sec⁡x∣+C\int\tan x\,dx = \log|\sec x| + CStep 2Section 7.2, formula (xii); Section 7.3.1 (Basics)
Laws of logarithms; a constant written as log⁡∣C∣\log|C|Steps 2, 3Laws of logarithms (Basics)
A particular solution gives the constant a valueStep 4Section 9.3 (Lesson)
ddxsec⁡x=sec⁡xtan⁡x\frac{d}{dx}\sec x = \sec x\tan xStep 5Chapter 5 (Basics)
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 →