Taking the derivative of a definite integral with respect to a different variable I've been looking through the textbook for the Differential Equations class I'll be taking next semester, and I came across the following problem in the first section:
Verify that the indicated family of functions is a solution of the given differential equation. Assume an appropriate interval I of definition for each solution.
$$ \frac{dy}{dx} + 2xy = 1; y = e^{-x^{2}}\int_{0}^{x}e^{t^{2}}dt + c_{1}e^{-x^{2}} $$
I'm struggling on multiple levels with this problem, but let me first lay out what I've done. I first tried to solve the integral, but failed using all of the methods I know. I then tried to just take the derivative of y and hope that the integral just kind of sorts itself out. I did as follows:
Let $f(t) = e^{t^{2}}$
Then $ F(t) = \int f(t) dt $. 
So then we have $ y = e^{-x^{2}}F(x) - e^{-x^{2}}F(0) + c_{1}e^{-x^{2}} $
And $ y' = -2xe^{-x^{2}}F(x) + e^{-x^{2}}f(x) +2xe^{-x^{2}}F(0) + e^{-x^{2}}f(0) -2c_{1}xe^{-x^{2}}$
But I got stuck here, because I have no way of finding $F(x)$ or $F(0)$.
Finally, I did a lot of searching through this site, though I wasn't sure exactly what the terminology for this exercise was. I came across a few examples that looked promising, but they all involved methods I have never been taught, such as the 'Leibniz Rule'.
Also, on the conceptual level, I'm struggling to imagine what the derivative with respect to x of a definite integral with a variable other than x. 
Would someone please explain not just the steps, but the reasoning behind them, for solving this problem? Also, apologies for any bad LaTeX formatting. I'm still learning.
Thanks!
Edit: Ok, so I've gotten up to this point:
$$ y' = -2xe^{-x^{2}}F(x) + 2xe^{-x^{2}}F(0) + e^{-x^{2}}f(x) - e^{-x^{2}}f(0) - 2c_{1}xe^{-x^{2}} $$
$$ y' = -2xe^{-x^{2}}\int_{0}^{x}e^{t^{2}}dt - e^{-x^{2}} + 1 $$
And plugging in $y$ and $y'$ gives me 
$$ \frac{dy}{dx} + 2xy = [-2xe^{-x^{2}}\int_{0}^{x}e^{t^{2}}dt - e^{-x^{2}} + 1 - 2c_{1}xe^{-x^{2}}] + 2x[e^{-x^{2}}\int_{0}^{x}e^{t^{2}}dt + c_{1}e^{-x^{2}}] $$
$$ = -2xe^{-x^{2}}\int_{0}^{x}e^{t^{2}}dt - e^{-x^{2}} + 1 + 2c_{1}xe^{-x^{2}} + 2xe^{-x^{2}}\int_{0}^{x}e^{t^{2}}dt + 2xc_{1}e^{-x^{2}} $$
$$ = 1 - e^{-x^{2}} \neq 1 $$
Where did I go wrong?
Edit 2: Or, did I screw up when I used the product rule above? Since $f$ is technically a function of $t$, is $\frac{d}{dx}F(t=x)$ equal to $f(x)$ or $0$?
 A: If $y(x)=e^{-x^2}\int_0^x e^{t^2}\,dt+c_1e^{-x^2}$, then
$$\begin{align}
y'(x)&=\color{blue}{-2xe^{-x^2} \int_0^x e^{t^2}\,dt} +\color{red}{e^{-x^2}e^{x^2}}-2xc_1e^{-x^2}\\\\
&=\color{blue}{-2x( y(x)-c_1e^{-x^2})}+\color{red}{1}-2xc_1e^{-x^2}\\\\
&=-2xy+1
\end{align}$$
A: Your solution is correct since it satisfies the differential equation. Solutions to some differential equations are expressed as integrals. Numerical analysis comes to rescue if a specific value is desired.     
A: You're not supposed to solve the equation, but just to check those functions are solutions. Set
$$
f(x)=\int_{0}^x e^{t^2}\,dt
$$
and differentiate $y=ce^{-x^2}+e^{-x^2}\int_{0}^x e^{t^2}\,dt=ce^{-x^2}+e^{-x^2}f(x)$:
$$
y'=-2cxe^{-x^2}-2xe^{-x^2}f(x)+e^{-x^2}f'(x)=-2cxe^{-x^2}-2xe^{-x^2}f(x)+1
$$
and so
$$
y'+2xy=-2cxe^{-x^2}-2xe^{-x^2}f(x)+1+2x(ce^{-x^2}+e^{-x^2}f(x))=1
$$
as desired.
Check your steps with this computation and you'll find your mistake.

You can also prove that every solution has that form.
The equation can be written $y'+2xy=1$. Set $y=e^{-x^2}z$, so
$$
y'=-2xe^{-x^2}z+e^{-x^2}z'
$$
and substituting in the equation yields
$$
-2xe^{-x^2}z+e^{-x^2}z'+2xe^{-x^2}z=1
$$
that is,
$$
z'=e^{x^2}
$$
A solution of this equation is clearly
$$
z=c+\int_{0}^x e^{t^2}\,dt
$$
for some constant $c$. You don't “compute” this integral (in terms of “elementary functions”). Why $0$ as the lower bound? It's completely irrelevant: the fundamental theorem of calculus tells you that
$$
f(x)=\int_{0}^x e^{t^2}\,dt
$$
has $f'(x)=e^{x^2}$, so any other function having the same derivative differs from $f$ by an additive constant. Choosing a different lower bound would only change $c$, which is an arbitrary constant. Since $y=e^{-x^2}z$, you get
$$
y=ce^{-x^2}+e^{-x^2}\int_{0}^x e^{t^2}\,dt
$$
as the general solution of the given differential equation.
