Thread: Help verifying solution for Differential equation

1. Help verifying solution for Differential equation

I am having problems verifying a solution for a differential equation. The equation is

$\displaystyle y\prime -2ty =1$

The solution to the equation is

$\displaystyle e^{t^2} \int\limits_{0}^{t} e^{-s^2}\, ds + e^{t^2}$

My problem is calculating the integral that is contained on the solution. I thought there was no way to calculate an integral of

$\displaystyle e^{t^2}$

at least that is what a tutor told me at the tutoring service the university provides.

2. $\displaystyle \int^{t}_{0} e^{-s^{2}} ds$ cannot be expressed in terms of a finite number of elementary functions. But the value of the integral can be approximated for different values of t.

3. Originally Posted by Random Variable
$\displaystyle \int^{t}_{0} e^{-s^{2}} dt$ cannot be expressed in terms of a finite number of elementary functions. But the value of the integral can be approximated for different values of t.
how would I go in approximating it for different values?

4. Originally Posted by fishguts
how would I go in approximating it for different values?
There are several numerical integration techniques (Newton-Cotes, Gaussian Quadrature, etc.).

But it would be best to let a computer program do it and plot the result.

5. Shouldn't there be a constant of integration in there? When I solve for the integrating factor and integrate I get:

$\displaystyle \mathop\int\limits_{\substack{t=t_0 \\ y(t_0)}}^{\substack{t=t \\ y(t)}} d\Big[ye^{-t^2}\Big]=\int_{t_0}^{t} e^{-t^2}$

$\displaystyle y(t)=e^{t^2}\int_{t_0}^{t} e^{-s^2}ds+y(t_0)e^{t^2}$

Now differentiate $\displaystyle y(t)$:

$\displaystyle \frac{d}{dt} y(t)=e^{t^2} e^{-t^2}+2te^{t^2}\int_{t_0}^{t} e^{-s^2}ds+y(t_0)2te^{t^2}$

Now you can back-substitute that into the differential equation to verify the solution. Also, just for fun, you can work with it in Mathematica: define y(t), y(0)=a, differentiate it, substitute it back into the DE:

Code:
In[73]:=
y[t_] := Exp[t^2]*Integrate[Exp[-s^2],
{s, 0, t}] + a*Exp[t^2]
FullSimplify[D[y[t], t] - 2*t*y[t]]

Out[74]= 1

6. Originally Posted by shawsend
Shouldn't there be a constant of integration in there?
I copied the problem as the book has it and there was no constant of integration in there.

7. Originally Posted by fishguts
I copied the problem as the book has it and there was no constant of integration in there.
The differential equation in the OP is a linear one. The standard solution to this is given in any textbook on differential equations. The resulting solution I got for this equation is:

$\displaystyle y(t)=e^{t^2}\cdot \left[K+\int e^{-t^2}dt \right]$

So, the integration constant is K and the derivative of the integral can easily be found to become the DE again. I do not see why one should have a definite integral in the solution.

coomast