1
$\begingroup$

How do I solve $\frac{dy}{dx}=5xy + \sin x$ explicitly? With $y(0) = 1$. I am asked to use an integrating factor. What I did:

$\frac{dy}{dx}-5xy = \sin x \\ \text{Integrating factor:} \ e^{\int{-5x\ dx}} = e^{-\frac{5}{2}x^2} \\ \frac{d}{dx}\left[e^{-\frac{5}{2}x^2}y\right] = e^{-\frac{5}{2}x^2}\sin x \\ e^{-\frac{5}{2}x^2}y = \int e^{-\frac{5}{2}x^2}\sin x \ dx$

How would I proceed from there? Edit: $y(0) = 1$.

Also, when does the scalar ODE (above) have a unique solution?

  • 0
    @Richard I'd stick to GEdgar's approach. Note that you get a simple identity! $1=1$2012-04-28

2 Answers 2

1

Rewrite ODE into form :

$(5xy+\sin x)dx-1\cdot dy=0$

Next , let's denote :

$M=5xy+\sin x ~\text{and}~ N=1$ , then :

integrating factor $u(x)$ is given by :

$u(x)=e^{\int\frac{\frac{\partial M}{\partial y}-\frac{\partial N}{\partial x}}{N}\,dx}=e^{\frac{5}{2}x^2}$

Use this procedure to find solution of ODE .

  • 0
    Thanks for your help! Sorry I forgot to add an initial condition, $y(0) = 1$.2012-04-25
1

This is a linear, non-homogeneous, differential equation. Mathematica suggests the solution $\left\{\left\{y(x)\to \frac{1}{20} e^{\frac{5 x^2}{2}} \left(20 c_1+\frac{i \sqrt{10 \pi } \left(\text{erf}\left(\frac{5 x+i}{\sqrt{10}}\right)+i \text{erfi}\left(\frac{1+5 i x}{\sqrt{10}}\right)\right)}{\sqrt[10]{e}}\right)\right\}\right\}.$ Your approach if perfectly correct, since linear equation always have an integrating factor. Yours has $e^{\frac{5}{2}x^2}$. I'm afraid you won't find an elementary solution, since $\int e^{-\frac{5}{2}x^2}\sin x\, \mathrm{d}x$ can't be expressed in terms of elementary functions. Of course, this does not mean that the exercise is impossible.

  • 0
    The solution proposed by Mathematica is a big mess, and it has to do with complex numbers. By the way, I believe that nobody wants to work with erf and erfi functions to solve a linear equation. For the general approach to first-order linear equations, see http://en.wikipedia.org/wiki/Linear_differential_equation : there is a paragraph where the method is explained.2012-04-26