# How do you integrate this problem?

int over [0.23847, 1] of 5 [ sqrt {x} - e^(-3x) ] ^2 dx

I'm getting a bit confused.

Relevance

I think this integral has no analytical solution

∫ 5 · [√x - e^(-3·x) ]² dx

= 5·∫ x - 2·√x·e^(-3·x) + e^(-6·x) dx

= 5·[ ∫ x dx - ∫ 2·√x·e^(-3·x) dx + ∫ e^(-6·x) dx ]

1st and 3rd integral are simple:

∫ x dx = (1/2)·x²

∫ e^(-6·x) dx = -6·e^(-6·x) dx

The 2nd integral is non-analytical.

You can express in terms of error function.

Error function is defined as:

erf(x) = (2/√π) · ∫|0→x| e^(-t²) dt

so substitute

z = √(3·x) <=> z² = 3·x => dx = (2/3)·z dz

∫ 2·√x·e^(-3·x) dx

= ∫ 2 · (z/√3) · e^(-z²) · (2/3)·z dz

= (4/9)·√3 · ∫ z²· e^(-z²) dz

Integrate by parts

(remember that d(e^(-z²))/dz = -2·x·e^(-z²)

= (2/9)·√3 · ∫ z · ( 2·z·e^(-z²) ) dz

= (2/9)·√3 · [ z·(-e^(-z²)) - ∫ 1· (-e^(-z²) dz

= (2/9)·√3 · [ ∫ e^(-z²) dz - z·e^(-z²)) ]

= (2/9)·√3 · [ (√π/2)·erf(z) - z·e^(-z²)) ]

= (1/9) · [ (√(3·π)·erf(z) - √3 ·z·e^(-z²)) ]

= (1/9) · [ (√(3·π)·erf(√(3·x)) - 6·x·e^(-3·x)) ]

Therefore

∫ 5 · [√x - e^(-3·x) ]² dx

= (5/2)·x² - (5/9)·[ (√(3·π)·erf(√(3·x)) - 6·x·e^(-3·x)) ] - 30·e^(-3·x)

The rest is cake, just insert your limits.

To calculate the values of erf(3·x) you can either use tabulated values . e.g:

http://www.math.hkbu.edu.hk/support/aands/toc.htm

or use online calculator like:

http://functions.wolfram.com/webMathematica/Functi...