Q82 / 180 · COMEDK 2025 (10 May Shift 3) · Mathematics

Solve the following differential equation $\cos ^2 x \dfrac{d y}{d x}+y=\tan x$, given that $y(0)=1$. Hence find $y\left(\dfrac{\pi}{4}\right)$

  • A
    $e$
  • B
    $1$
  • C
    $2$
  • Correct answer
    D
    $\dfrac{2}{e}$

Solution

The given differential equation is $\cos^2 x \dfrac{dy}{dx} + y = \tan x$. Dividing by $\cos^2 x$, we get $\dfrac{dy}{dx} + y \sec^2 x = \tan x \sec^2 x$.

This is a linear differential equation of the form $\dfrac{dy}{dx} + Py = Q$, where $P = \sec^2 x$ and $Q = \tan x \sec^2 x$.

The integrating factor (IF) is $e^{\int P dx} = e^{\int \sec^2 x dx} = e^{\tan x}$.

The general solution is $y \cdot IF = \int Q \cdot IF dx + C$. Substituting the values, $y e^{\tan x} = \int \tan x \sec^2 x e^{\tan x} dx + C$.

Let $u = \tan x$, then $du = \sec^2 x dx$. The integral becomes $\int u e^u du = u e^u - e^u + C$.

Thus, $y e^{\tan x} = e^{\tan x}(\tan x - 1) + C$, which simplifies to $y = \tan x - 1 + C e^{-\tan x}$.

Given $y(0) = 1$, substituting $x = 0$ gives $1 = \tan(0) - 1 + C e^{-\tan(0)} \Rightarrow 1 = -1 + C \Rightarrow C = 2$.

The particular solution is $y = \tan x - 1 + 2 e^{-\tan x}$.

Evaluating at $x = \dfrac{\pi}{4}$, $y\left(\dfrac{\pi}{4}\right) = \tan\left(\dfrac{\pi}{4}\right) - 1 + 2 e^{-\tan(\pi/4)} = 1 - 1 + 2 e^{-1} = \dfrac{2}{e}$.

Answer: $\dfrac{2}{e}$

Hence, the correct answer is option: 'D'.

Relevant Questions