computing differential equation using general solution

111 Views Asked by At

$$\require{cancel}$$

Given equation: $$\frac{dy}{dx}+\frac{\sin(x)}{\cos(x)}y=\frac{1}{\cos(x)}$$ Integrating factor: $$e^{\int \frac{\sin(x)}{\cos(x)}dx}=e^{-\ln|\cos(x)|}=\frac{1}{\cos(x)}$$ Multiply the equation with integrating factor gets $$\frac{d}{dx}\left(\frac{y}{\cos(x)}\right)=\frac{1}{\cos^{2}(x)}$$

$$\rightarrow \cancel{\frac{\sin(x)}{\cos^2(x)}y=\frac{1}{\cos^2(x)}}$$

$$\rightarrow \cancel{y=\frac{1}{\sin(x)}}$$

correction:

Integrate both sides get:

$$\rightarrow \frac {y}{\cos(x)}=\tan(x)+C$$

$$\rightarrow y=\frac{\sin(x)(\cos(x))}{\cos(x)}+C\cos(x)$$

$$\rightarrow y=\sin(x)+C\cos(x)$$

this is so far my steps for computing the solution, can anyone verify my step if there's any mistake?

1

There are 1 best solutions below

0
On BEST ANSWER

Could not understand the last $2$ steps. The steps, in any case, should have been - $$\frac{d}{dx}\left(\frac{y}{\cos x}\right)=\frac{1}{\cos^2 x}$$ or,$$d\left(y\sec x\right)=\sec^2 x dx$$ or,$$\int d\left(y\sec x\right)=\int \sec^2 x dx$$ or,$$y\sec x=\tan x +c_1$$ or,$$y=\sin x + c_1\cos x$$