<s>[INST] $\int_0^1e^{(ax^2 + bx)}dx$ in terms of erf I'm trying to evaluate the definite integral, 
$$\int_0^1e^{(ax^2 + bx)}dx$$
in terms of the function, 
$$F(z)=\int_0^ze^{p^2}dp$$
The correct answer that i'm supposed to get is, 
$$\int_0^1e^{(ax^2 + bx)}dx=\frac{e^{-\frac{b^2}{4a}}}{\sqrt{a}}[F(\frac{a+b}{\sqrt{a}})-F(\frac{b}{\sqrt{a}})] $$
However i'm getting a slightly different answer with $\frac{1}{2}$ appearing in the arguments to the function F. What I get is the below,
$$\int_0^1e^{(ax^2 + bx)}dx=\frac{e^{-\frac{b^2}{4a}}}{\sqrt{a}}[F(\frac{a+b}{2\sqrt{a}})-F(\frac{b}{2\sqrt{a}})] $$
Can someone advise if i'm doing something wrong?
Many thanks!
 [/INST] $$
ax^2 + bx = a\left(x+\frac{b}{2a}\right)^{2} - \frac{b^2}{4a}
$$
thus
$$
\mathrm{e}^{ - \frac{b^2}{4a}}\int_0^1 \mathrm{e}^{a\left(x+\frac{b}{2a}\right)^{2}}dx
$$
let $p = \sqrt{a}\left(x+\frac{b}{2a}\right)$
then we have
$$
\int_{\frac{b}{2\sqrt{a}}}^{\sqrt{a}\left(1+\frac{b}{2a}\right)}\mathrm{e}^{p^2}\frac{dp}{\sqrt{a}}
$$
or
$$
\frac{1}{\sqrt{a}}\mathrm{e}^{ - \frac{b^2}{4a}}\left[\int_0^{\sqrt{a}\left(1+\frac{b}{2a}\right)}\mathrm{e}^{p^2}dp -\int_0^{\frac{b}{2\sqrt{a}}}\mathrm{e}^{p^2}dp \right]
$$
set $s = \frac{b}{2}$ and $a = t$
we find
$$
\sqrt{a}\left(1+\frac{b}{2a}\right) = \sqrt{t}\left(1 + \frac{s}{t}\right) = \frac{s+t}{\sqrt{t}}\\
\frac{b}{2\sqrt{a}} = \frac{s}{\sqrt{t}}
$$
and finally
$$
\mathrm{e}^{ - \frac{b^2}{4a}}\frac{1}{\sqrt{t}}\left[\int_0^{\frac{s+t}{\sqrt{t}}}\mathrm{e}^{p^2}dp 
-\int_0^{\frac{s}{\sqrt{t}}}\mathrm{e}^{p^2}dp \right]
$$
so your answer is out by a factor of 2 due to not setting your final version of "$x$" as $b/2$. But this is purely a game of trying to match the correct answer
</s>