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.

  • 1
    One way is what @GEd$g$ar wrote in the previous thread.2012-05-01