Just a little tip on integrating exponentials.
If the question is
Then the answer is
For example, would be
You can of course check this by differentiating your answer and see if you get your original equation.
NOTE: This only works if the f(x) is a linear equation.
I mean that the answer to cannot be expressed as a finite number of elementary functions. If you post the details of your calculation I will point out your mistakes. Did you try differentiating your answer? Do you get ?
If this integral arises as a result of a question you're trying to answer, I suggest you post the entire question exactly as it's written.
It is not correct because the derivative of has to be done by the product rule: (fg)'= f'g+ fg'. The derivative of is and that, multiplied by will give but then the derivative of is so the derivative of the entire is , not just .
Craig's advice for integrating in general is not correct because what he is trying to do is use the substitution u= f(x). Then du= f'(x)dx so dx= du/f'(x). Putting those into the integral we have and, apparently, he is taking that f'(x) outside the integral. But if f is not linear, then f' is a function of x and cannot be taken outside the integral- it must be integrated also. If f were linear, that is, if f(x)= ax+ b then f'(x)= a, a constant and we can do that: Letting u= ax+ b, du= adx so dx= dx/a and . But that is only possible with a being a constant.
You should understand that most (in a very specific sense "almost all") integrable functions do NOT have "elementary functions" as integrals. (Elementary functions" are basically all the functions that you see in Calculus or lower level courses.)
About the best you can do with is make the linear substitution . Then and so where "erf(x)" is defined as . It is a non-elementary function, called the "error function" and is used extensively in statistics. In fact, I wouldn't be surprised if that problem came from a statistics course.