0
$\begingroup$

I have $\frac{dy}{dx}=5xy + \sin x$, $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 \\ y = e^{\frac{5}{2}x^2}\int e^{-\frac{5}{2}x^2}\sin x \ dx$

However, in my previous thread, How to solve $\frac{dy}{dx}=5xy + \sin x$?, few users said $y = e^{\frac{5}{2}x^2}\big(1+\int_0^x e^{-\frac{5}{2}t^2}\sin t \, dt\big)$ or $y = e^{\frac{5}{2} x^2} (\int e^{-\frac{5}{2} x^2} \sin x\ dx + C)$

But Im wondering, where does the $1$ or $c$ come from? Shouldnt it just be $y = e^{\frac{5}{2}x^2}\int e^{-\frac{5}{2}x^2}\sin x \ dx$?

Edit: $y = e^{\frac{5}{2}x^2}\int e^{-\frac{5}{2}x^2}\sin x \ dx + Ce^{\frac{5}{2}x^2}\\ \text{using } y(0) =1 \\c=1\\ y = e^{\frac{5}{2}x^2}\left(\int e^{-\frac{5}{2}x^2}\sin x \ dx + 1\right)$

1 Answers 1

1

The point is that $\int \ldots\ dx$ is an antiderivative, which always is defined only up to an arbitrary constant. So if you get one solution with a certain choice $g(x)$ for the antiderivative, you will get others by replacing $g(x)$ by $g(x)+C$, where $C$ is any constant. And you will need the freedom to choose that constant, because you also have an initial condition $y(0)=1$ to satisfy.

  • 0
    Thanks @RobertIsrael , can I ask, why did the other user put $1$ instead of $C$?2012-04-30
  • 1
    He was using a particular antiderivative (a definite integral) and the $1$ was the value of $C$ that was needed to satisfy the initial condition.2012-04-30
  • 0
    Ok thanks! Especially for the point about 'needing the freedom to choose that constant' Lastly, I edited my post, is what I did correct (the final solution)?2012-04-30
  • 0
    No, because you didn't specify which antiderivative your $\int e^{-\frac{5}{2}x}\sin x\ dx$ is.2012-04-30
  • 0
    Sorry, I've edited it, is it correct now? Most appreciated.2012-04-30
  • 0
    Where did you say which antiderivative it is?2012-05-01
  • 0
    Thanks @RobertIsrael , but sorry I really dont get it, what should I write then? Is writing $F(x) = \int e^{-\frac{5}{2} x^2} \sin x\ dx$ enough? Most appreciated again.2012-05-01
  • 1
    One way is what @GEdgar wrote in the previous thread.2012-05-01