© All Rights reserved @ LearnWithDash
Step 1: Express the differential equation in standard form
We start with the given differential equation:
$$(y + 1)\tan^2 x\,dx + \tan x\,dy + y\,dx = 0.$$
Rewriting in terms of $\frac{dy}{dx}$, we group the $dy$ and $dx$ terms together:
$$(y + 1)\tan^2 x\,dx + y\,dx + \tan x\,dy = 0.$$
Combine like terms in $dx$:
$$(y + 1)\tan^2 x + y\Big)\,dx + \tan x\,dy = 0.$$
Hence,
$$\tan x\,dy + \bigl((y + 1)\tan^2 x + y\bigr)\,dx = 0.$$
Solving for $\frac{dy}{dx}$,
$$\tan x\,\frac{dy}{dx} + (y + 1)\tan^2 x + y = 0,$$
which gives
$$\frac{dy}{dx} = -\frac{(y + 1)\tan^2 x + y}{\tan x}.$$
Rewriting more neatly,
$$\frac{dy}{dx} + \frac{\sec^2 x}{\tan x} \, y = -\tan x.$$
Step 2: Calculate the integrating factor
The linear differential equation is of the form
$$\frac{dy}{dx} + P(x) \, y = Q(x),$$
where $P(x) = \frac{\sec^2 x}{\tan x}$ and $Q(x) = -\tan x.$
The integrating factor (IF) is given by
$$\text{IF} = e^{\int P(x)\,dx} = e^{\int \frac{\sec^2 x}{\tan x}\,dx}.$$
Notice that
$$\int \frac{\sec^2 x}{\tan x}\,dx = \int \frac{1}{\tan x}\sec^2 x \,dx = \ln(\tan x).$$
Therefore,
$$\text{IF} = e^{\ln(\tan x)} = \tan x.$$
Step 3: Multiply the differential equation by the integrating factor and integrate
Multiplying both sides of
$$\frac{dy}{dx} + \frac{\sec^2 x}{\tan x} \, y = -\tan x$$
by $\tan x$ gives
$$\tan x \,\frac{dy}{dx} + \sec^2 x \, y = -\tan^2 x.$$
Observe that the left-hand side is the derivative of $y \tan x$:
$$\frac{d}{dx}\bigl(y \tan x\bigr) = -\tan^2 x.$$
Integrate both sides with respect to $x$:
$$y \tan x = \int -\tan^2 x\,dx.$$
Recall that $\tan^2 x = \sec^2 x - 1,$ so
$$\int \tan^2 x\,dx = \int (\sec^2 x - 1)\,dx = \tan x - x.$$
Thus,
$$y \tan x = - \bigl(\tan x - x\bigr) + C = -\tan x + x + C.$$
Hence,
$$y = -1 + \frac{x}{\tan x} + \frac{C}{\tan x}.$$
Step 4: Determine the constant using the boundary condition
We are given the condition:
$$\lim_{x \to 0^+} x\,y(x) = 1.$$
Substitute $y$ into $x\,y(x)$:
$$x \,y(x) = x \Bigl(-1 + \frac{x}{\tan x} + \frac{C}{\tan x}\Bigr)
= -x + \frac{x^2}{\tan x} + \frac{C\,x}{\tan x}.$$
As $x \to 0^+$, $\tan x \approx x.$ Hence,
$$\lim_{x \to 0^+} \frac{x^2}{\tan x} = \lim_{x \to 0^+} x,$$
and
$$\lim_{x \to 0^+} \frac{C\,x}{\tan x} = C.$$
Therefore,
$$\lim_{x \to 0^+} x\,y(x) = \lim_{x \to 0^+} \bigl(-x + x + C\bigr) = C.$$
Since this limit must be $1,$ we get $C = 1.$
Thus, the solution becomes
$$y(x) = -1 + \frac{x + 1}{\tan x} = \cot x + x\cot x - 1.$$
Step 5: Find $y\left(\frac{\pi}{4}\right)$
Evaluate $y\left(\frac{\pi}{4}\right)$ using $\cot\left(\frac{\pi}{4}\right) = 1$:
$$y\left(\frac{\pi}{4}\right) = \cot\left(\frac{\pi}{4}\right) + \frac{\pi}{4}\cdot \cot\left(\frac{\pi}{4}\right) - 1
= 1 + \frac{\pi}{4} \cdot 1 - 1
= \frac{\pi}{4}.$$
Final Answer
The value of $y\left(\frac{\pi}{4}\right)$ is
$$\frac{\pi}{4}.$$