3
$\begingroup$

I want to solve this integral from $-\infty$ to $x$ . $$f_X(x)=\frac{1}{\sqrt{2\pi}} e^{-(\frac{x^2}{2}+2x+2)}, -\infty<x<\infty$$ I have searched as much as I could and I found a solution in wikipedia $$\int_{-\infty}^{\infty} x e^{-a(x-b)^2} dx=b \sqrt{\frac{\pi}{a}}$$ In that solution there is a $x$ before $e$ but in my problem there is not any $x$ before $e$ and it is the only deference also the answer in that solution is a number but I need a function which contains $x$ . I really need this answer as soon as possible

$\endgroup$
  • 1
    $\begingroup$ I don't understand what is actually inside the integral... $\endgroup$ – Simply Beautiful Art Dec 26 '16 at 16:03
  • 2
    $\begingroup$ What is your question? You didn't post anything of substance. Also, do you have any (valid) attempts at work? Saying you searched on the internet as much as you could is not a valid attempt at the problem $\endgroup$ – cool.coolcoolcool Dec 26 '16 at 16:04
  • $\begingroup$ @mayam, lookup complementary error function. Pay attention to the limits of that definition. $\endgroup$ – Srini Dec 26 '16 at 19:42
  • $\begingroup$ @cool, to be quite fair, the integral is not something usually taught to children and non-specialists, so at least the mention of the OP that a search was done is alright. On that note: completing the square should be useful here. $\endgroup$ – J. M. is a poor mathematician Dec 26 '16 at 19:50
  • $\begingroup$ @J.M before the edit, the question contained no integral. It simply read something to the extent of "I cannot solve this integral" but did not have an integral written. This is why I said what I did. $\endgroup$ – cool.coolcoolcool Dec 26 '16 at 20:47
6
$\begingroup$

Complete the square in the exponential function, then let $y=\frac{x+2}{\sqrt{2}}$

\begin{align} \frac{1}{\sqrt{2 \pi}} \int\limits_{-\infty}^{z} \mathrm{e}^{-(\frac{1}{2}x^{2}+2x+2)} dx &= \frac{1}{\sqrt{2 \pi}} \int\limits_{-\infty}^{z} \mathrm{e}^{-\frac{1}{2}(x+2)^{2}} dx \\ &= \frac{1}{\sqrt{\pi}} \int\limits_{-\infty}^{(z+2)/\sqrt{2}} \mathrm{e}^{-y^{2}} dy \\ &= \frac{1}{\sqrt{\pi}} \frac{\sqrt{\pi}}{2} \mathrm{erf}(y) \Big|_{-\infty}^{(z+2)/\sqrt{2}} \\ &= \frac{1}{2} \mathrm{erf}\left(\frac{z+2}{\sqrt{2}} \right) + \frac{1}{2} \end{align}

Where $$\int \mathrm{e}^{-y^{2}} dy = \frac{\sqrt{\pi}}{2} \mathrm{erf}(y) + C$$ is the error function.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.