# Rules of Integration

Integration is a good deal more complicated than differentiation and normally requires a number of attempts using alternative methods to find an acceptable solution along with a reasonable knowledge of standard integrals.
CalQlata has included a number of the basic integrals on this site but you will find a great deal more in reference document 19.

If you are having problems finding a solution using standard integration rules, why not try Simpson's Rule

The following table contains some rules and worked examples for integration.

## Rules & Methods of Intergration

 dy/dx = a.xn dy = ∫a.xn.dxy = a.xn+1/n+1 dy/dx = u + v dy = ∫u.dx + ∫v.dx Trigonometric Functions A fairly straight-forward example of this integration procedure is provided below; Integrate ∫Sin³(x)/Cos²(x).dx ∫Sin(x).Sin²(x)/Cos²(x).dx {as Sin²(x) = 1-Cos²(x) see Trig Functions} ∫Sin(x).(1-Cos²(x))/Cos²(x).dx ∫Sin(x)/Cos²(x).dx - ∫Sin(x).Cos²(x)/Cos²(x).dx ∫Sin(x)/Cos²(x).dx - ∫Sin(x).dx {as Sin(x)/Cos(x) = Tan(x) see Trig Functions} ∫Tan(x)/Cos(x).dx - ∫Sin(x).dx {as 1/Cos(x) = Sec(x) see Trig Functions} ∫Tan(x).Sec(x).dx - ∫Sin(x).dx {as ∫Tan(x).Sec(x).dx = Sec(x) see Standard Integrals} Sec(x) + Cos(x) Algebraic Substitution A fairly straight-forward example of this integration procedure is provided below; Integrate ∫x/(x+3)½.dx If you set; u = (x+3)½; then u² = x+3 or x = u²-3 {and if x = u²-3 then dx = 2u.du} Substituting: ∫x/(x+3)½.dx = ∫(u²-3) / u . 2u.du ... = 2∫(u²-3).du ... = 2∫u².du - 2∫3.du ... = 2.u³/3 - 2.3.u ... = 2.(u³/3 - 3u) ... = 2u.(u²/3 - 3) ... = ⅔u.(u² - 9) Reverse Substitution: {because u = (x+3)½ and u² = x+3} ... = ⅔(x+3)½.(x+3 - 9) ... = ⅔(x+3)½.(x-6) Trigonometric Substitutions(typical) With practice you will get to see the best way to reorganise your formulas for ease of integration. To give you some idea of how to do this, see the following worked examples: Integrate ∫Sin²(x).dx note: Sin²(x) = Sin(x).Sin(x) = ½(Cos(x-x)-Cos(x+x)) ... = ½(1-Cos(2x)) {Cos(x-x) = Cos(0) = 1} Therefore Sin²(x) = ½(1-Cos(2x)) ∫Sin²(x).dx = ∫½(1-Cos(2x)).dx = ½∫dx - ½∫Cos(2x).dx ... = ½.x - ½.Sin(2x)/2 x/2 - Sin(2x)/4 Integrate ∫Sin(x).Cos(x).dx note: Sin(x).Cos(x) = ½(Sin(x+x)+Sin(x-x)) ... = ½(Sin(2x)+0) {Sin(x-x) = Sin(0) = 0} Therefore Sin(x).Cos(x) = ½.Sin(2x) ∫Sin(x).Cos(x).dx = ∫½.Sin(2x).dx = ½∫Sin(2x).dx ... = -½.Cos(2x)/2 -Cos(2x)/4 By Parts This method is based upon a reverse procedure for the differentiation 'Product Rule': i.e. dy/dx = u.dv/dx + v.du/dx If y = uv d(uv)/dx = u.dv/dx + v.du/dx uv = ∫u.dv.dx/dx + ∫v.du.dx/dx uv = ∫u.dv + ∫v.du ∫u.dv = uv - ∫v.du # Example: Integrate ∫3x.Sin(x).dx Set u = 3x and dv = Sin(x).dx then du = 3.dx and v = -Cos(x) As ∫u.dv = uv - ∫v.du {see above #} ∫u.dv = 3x.-Cos(x) - ∫-Cos(x).3.dx ∫u.dv = 3∫Cos(x).dx - 3x.Cos(x) ∫3x.Sin(x).dx = 3∫Cos(x).dx - 3x.Cos(x) Integrating 3∫Cos(x).dx = 3.Sin(x) ... ∫3x.Sin(x).dx = 3.Sin(x) - 3x.Cos(x)

## Simpson's Rule

If you find that your integral is difficult to solve using normal methods of integration,
for example when calculating the arc length (ℓ) of an hyperbola using the universal hyperbolic formula; x²/a² - y²/b² = 1
you can always use Simpson's rule (also called the parabolic rule):
ℓ = δx/3 . Σ{ƒ(x₁) + 4.ƒ(x₁+δx) + 2.ƒ(x₁+2.δx) + 4.ƒ(x₁+3.δx)... + 4.ƒ(x₁+(n-1).δx) + ƒ(x₁+n.δx)}
note: the first and last terms in the series are not multiplied by '4' or '2' and the second and second to last terms in the series are always multiplied by '4'

 e.g.: ℓ = ʃ(1 + b²/(a²-a⁴/x²))⁰˙⁵ is a painful integral to solve by normal integration Simpson's Rule may be applied as follows: 1) replace (1 + b²/(a²-a⁴/x²))⁰˙⁵ with ƒ(x) 2) select points x₁ and x₂ on your curve between which you need an arc length (ℓ) 3) divide this distance (x₂-x₁) by any even number (n) thus: δx = (x₂-x₁)/n the larger the number (n) the more accurate the result (see Examples 1 & 2 below) 4) generate the following formula ℓ = δx/3 . Σ[ƒ(x₁) + 4.ƒ(x₁+δx) + 2.ƒ(x₁+2.δx) + 4.ƒ(x₁+3.δx) + 2.ƒ(x₁+4.δx).......+ 4.ƒ(x₁+(n-1).δx) + ƒ(x₁+n.δx)] note: x₁+n.δx = x₂ 5) replace each function term with the formula thus: e.g. ... + 2.ƒ(x₁+4.δx) + ... = ... + 2.(1 + b²/(a²-a⁴/(x₁+4.δx)²))⁰˙⁵ + ... So Simpson's version of the formula now looks like this: ℓ = δx/3 . Σ[(1 + b²/(a²-a⁴/(x₁)²))⁰˙⁵ + 4.(1 + b²/(a²-a⁴/(x₁+δx)²))⁰˙⁵ +2.(1 + b²/(a²-a⁴/(x₁+2.δx)²))⁰˙⁵ + 4.(1 + b²/(a²-a⁴/(x₁+3.δx)²))⁰˙⁵ +2.(1 + b²/(a²-a⁴/(x₁+4.δx)²))⁰˙⁵...... + 4.(1 + b²/(a²-a⁴/(x₁+(n-1).δx)²))⁰˙⁵ +(1 + b²/(a²-a⁴/(x₁+n.δx)²))⁰˙⁵] which is easily solved The following two examples give you some idea of the errors you can expect with Simpson's Rule, dependent upon the number of terms (n) you use for your calculation Example 1: ∫1/(x⁰˙⁵ + 2).dx = 2.(x⁰˙⁵ - 2.Ln(x⁰˙⁵ + 2)) where f(x) = 1/(x⁰˙⁵ + 2) if x₁ = 4.7 and x₂ = 7.9; 2.(x⁰˙⁵ - 2.Ln(x⁰˙⁵ + 2)) = 0.71182137680140 n Simpson's Result error 6 0.71182177389969 -3.971E-07 10 0.71182142888220 -5.208E-08 30 0.71182137744831 -6.469E-10 60 0.71182137684185 -4.045E-11 500 0.71182137680140 -5.662E-15 2000 0.71182137680140 -4.552E-15 Example 2: ∫(b.x + c.x²)⁰˙⁵ / x³.dx = -2.((b.x + c.x²)³)⁰˙⁵ / 3.b.x³ where f(x) = (b.x + c.x²)⁰˙⁵ / x³ if x₁ = 2 and x₂ = 4.73; -2.((b.x + c.x²)³)⁰˙⁵ / 3.b.x³ = 0.6172678975456420 n Simpson's Result error 6 0.61771478518934 -4.47E-04 10 0.61733233858500 -6.44E-05 30 0.61726874433157 -8.47E-07 60 0.61726795080312 -5.33E-08 500 0.61726789755672 -1.11E-11 2000 0.61726789754573 -8.82E-14