Question:

If the general solution of the differential equation \[ \cos^2x\frac{dy}{dx}+y=\tan x \] is \[ y=\tan x-1+Ce^{-\tan x} \] and it satisfies \[ y\left(\frac{\pi}{4}\right)=1, \] then \(C=\)

Show Hint

To find the arbitrary constant in a differential equation, substitute the given initial condition directly into the general solution.
Updated On: Jun 22, 2026
  • \(e\)
  • \(1\)
  • \(-1\)
  • \(\frac{1}{e}\)
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is A

Solution and Explanation

Step 1: Use the given general solution.
Given, \[ y=\tan x-1+Ce^{-\tan x} \] Also, \[ y\left(\frac{\pi}{4}\right)=1 \] Substitute \[ x=\frac{\pi}{4} \] in the solution.

Step 2: Evaluate trigonometric values.
Since, \[ \tan\frac{\pi}{4}=1 \] we get \[ 1=1-1+Ce^{-1} \] \[ 1=\frac{C}{e} \]

Step 3: Solve for \(C\).
Multiplying both sides by \(e\), \[ C=e \]

Step 4: Final conclusion.
Therefore, \[ \boxed{e} \]
Was this answer helpful?
0
0