0
$\begingroup$

I need to solve the integral $$\int^x \frac{1}{t^2}e^{t^2}dt. $$ The answer should be $$\sqrt{\pi}\left(\text{erfi}(x)\right)-\frac{e^{x^2}}{x} + C$$

What does $\text{erfi}(x)$ mean? Can anybody explain how to solve this integral step-by-step? Thanks!

I need to solve the 2nd order differential equation $$y'' -2xy'+2y=0 $$ using that $y_1=Cx$. The solution of $y_2$ should then be \begin{align}y_2 &=y_1\int^x\frac{1}{{y_1(t)}^2}\exp \left(-\int^t{-2s}\,ds\right) \,dt\\ &=Cx\int^x\frac{1}{(Ct)^2}\exp \left(\int^t{(2s)}\,ds\right) \,dt\\ &=\frac{x}{C}\int^x\frac{1}{t^2} \exp \left(\int^t{(2s)}\,ds\right) \,dt\\ &= \frac{x}{C}\int^x\frac{1}{t^2}e^{t^2}\, dt \end{align}

  • 0
    That "answer" looks pretty fishy: how come $\,t\,$ appears in it??2012-12-02
  • 0
    Off course it should be x instead of t2012-12-02
  • 1
    One type of [error function that's called the Imaginary Erf](http://en.wikipedia.org/wiki/Error_function): $\operatorname{erfi}(z)=-i \operatorname{erf}(iz)$2012-12-02
  • 0
    tnx. My ultimate goal is to write down the solution of this differential equation as correct as possible :-)2012-12-02

1 Answers 1

1

You are correct, $y_2=\frac{x}{C}\int\frac{e^{x^2}}{x^2}\, dx $. This indefinite integral can't be written in terms of elementary functions (polynomials, exponential, trigonometric functions and their inverses). It is useful however to express it in terms of power series. Indeed since $$e^t=\sum_{n=0}^{\infty}\frac{t^n}{n!}$$ we easily see that \begin{equation}\int\frac{e^{x^2}}{x^2}\, dx=\int\frac{1}{x^2}\sum_{n=0}^{\infty}\frac{(x^2)^n}{n!}\, dx=\int\sum_{n=0}^{\infty}\frac{x^{2n-2}}{n!}\, dx=\sum_{n=0}^{\infty}\int\frac{x^{2n-2}}{n!}\, dx=\sum_{n=0}^{\infty}\frac{x^{2n-1}}{n!(2n-1)}\, dx \end{equation} Therefore, \begin{equation}y_2=\frac{x}{C}\int\frac{e^{x^2}}{x^2}\, dx=\frac{1}{C}\sum_{n=0}^{\infty}\frac{x^{2n}}{n!(2n-1)}\, dx \end{equation} In order to study such sums (and especially integrals with terms like $e^{x^2}$) that are very improtant for probability and statistics, we defined the error function $erf$ and the imaginary error function $erfi$. The Wikipedia entry for Error Function might be of interest to you. In the course of differential equations, you shall encounter other differential equations, the solutions of which may not elementary functions but can be expressed as a power series.

EDIT: We shall reduce this to the error function: \begin{gather}\int\frac{e^{x^2}}{x^2}\, dx=-\int\left(\frac{1}{x}\right)^{\prime}e^{x^2}\, dx=-\frac{e^{x^2}}{x}+\int\frac{1}{x}(e^{x^2})^{\prime}\, dx=-\frac{e^{x^2}}{x}+\int\frac{1}{x}e^{x^2}2x\, dx\Rightarrow \\\int\frac{e^{x^2}}{x^2}\, dx=-\frac{e^{x^2}}{x}+2\int e^{x^2}\, dx\end{gather} I think the OP can handle the rest

  • 0
    Thank you for your comprehensive response. Can you explain how I can use the erfi function in my solution? I see the solution of y2, but what part of the solution corresponds with the erfi function?2012-12-02
  • 1
    @Hempo You can't simplify it or anything. You just leave it as is (or use the power series in my answer).2012-12-02
  • 0
    But, There is a hint I could use, in the assignment: "You might want to make use of the imaginary error function $$erfi(x):= 2 \int_0^x e^{t^2} dt /{\sqrt{\pi}}$$2012-12-02
  • 1
    @Hempo Let me update my answer.2012-12-02