Tab'z's questions at Yahoo! Answers regarding a linear first order IVP

Staff member

MarkFL

Staff member
Hello Tab'z,

We are given to solve the IVP:

$$\displaystyle \frac{dy}{dx}+\tan(x)y=\cos^2(x)$$ where $$\displaystyle y(0)=2$$

We should observe that the ODE is a first order linear equation, and so we want to compute the integrating factor as follows:

$$\displaystyle \mu(x)=e^{\int\tan(x)\,dx}=\sec(x)$$

Multiplying the ODE by the integrating factor, we have:

$$\displaystyle \sec(x)\frac{dy}{dx}+\sec(x)\tan(x)y=\cos(x)$$

Now, recognizing that the left side is the differentiation of a product, we may write:

$$\displaystyle \frac{d}{dx}\left(\sec(x)y \right)=\cos(x)$$

Integrating with respect to $x$, we find:

$$\displaystyle \int\,d\left(\sec(x)y \right)=\int\cos(x)\,dx$$

$$\displaystyle \sec(x)y=\sin(x)+C$$

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

Now, using the given initial condition, we may find the parameter $C$:

$$\displaystyle y(0)=\sin(0)\cos(0)+C\cos(0)=C=2$$

Hence, the solution satisfying the given IVO is:

$$\displaystyle y(x)=\sin(x)\cos(x)+2\cos(x)=\cos(x)(\sin(x)+2)$$

To Tab'z and any other guests viewing this topic, I invite and encourage you to post other differential equations problems here in our Differential Equations forum.

Best Regards,

Mark.