How to find the general solution for this ODE?

339 Views Asked by At

I'm really stuck on how to go about solving the following first order ODE; I've got little idea on how to approach it, and I'd really appreciate if someone could give me some hints and/or working for a solution so I can have a reference point on how to approach these sorts of problems.

The following is one of many ODE's I've gotten off a problem set I found in a textbook at a library:

$$y' = xe^{-\sin(x)} - y\cos(x)$$

Can anyone help?

3

There are 3 best solutions below

0
On BEST ANSWER

I always like to think of these type of ODE's in terms of the product rule. \begin{equation}x=y'e^{\sin(x)}+y\cos(x)e^{\sin(x)}=\left(ye^{\sin(x)}\right)' \end{equation} So integrating both sides and dividing by $e^{\sin(x)}$ yields\begin{equation}y=e^{-\sin(x)}\left(\frac{1}{2}x^2+c\right). \end{equation}

0
On

The particular solution is $$y=\frac{1}{2}x^2 e^{-\sin x}$$

Then solve for the homogeneous solution.

Can you take it from here?

0
On

This kind of ODE should be solved as follows:

  1. Solve the corresponding homogeneous equation.

In your case it is $y'+y\cos(x)=0$ which has solution $y=c\cdot e^{-\sin(x)}$.

  1. Consider constant in previous solution as a function of variable $x$ and substitute it in original equation.

So, we have $y(x)=c(x)\cdot e^{-\sin(x)}$ and should substitute it into $y'+y\cos(x) = xe^{-\sin(x)}$.

This leads us to general solution in the form of $y(x) = \frac{1}{2}x^2e^{-\sin(x)}+ce^{-\sin(x)}$.