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
    Whether you can integrate it in closed form or not, you've found the solution: just take your last equation and multiply both sides by $e^{\frac{5}{2} x^2}$ to get $y = e^{\frac{5}{2} x^2} (F(x) + C)$ where $F(x) = \int e^{-\frac{5}{2} x^2} \sin x\ dx$. An ODE never has a unique solution, you always need an initial condition to specify a unique solution.2012-04-25
  • 0
    Robert is right. If the instructions are: "Solve using an integrating factor", then you have done that. It just happens that your solution involves an integral. Maybe divide to get "$y=\dots$".2012-04-25
  • 0
    Thanks @ Robert Israel @GEdgar. I forgot to add in the initial condition. It is $y(0) = 1$. How do I proceed from there? From my working above, can I then just substitute $y(0) = 1$?2012-04-25
  • 0
    Yes, like this:$$y = e^{\frac{5}{2}x^2}\big(1+\int_0^x e^{-\frac{5}{2}t^2}\sin t \, dt\big)$$2012-04-25
  • 0
    Thanks @GEdgar ! I get $1 = 1(1+0)$, is that correct? Or Shouldnt the $1$ be a $C$? Constant.2012-04-25
  • 0
    @Richard I'd stick to GEdgar's approach. Note that you get a simple identity! $1=1$2012-04-28

2 Answers 2