CHAPTER 6
Interventions for exact solutions to difficult integrals
6.1 Partial fractions
6.1.1 Terminology
a) A power series in x: a series (terms added together) containing powers of with constant coefficients, for
example, is a power series in with constant coefficients . The last term is
the coefficient of .
b) The Degree of a power series in x:
0'th degree: is the highest powered in the expression
(constants only)
1'st degree: is the highest powered in the expression
2'nd degree: is the highest powered in the expression
n'th degree: is the highest powered in the expression
c) Denominators and numerators of fractions:
d) Proper and Improper fractions: Proper is when the degree of the numerator is strictly less than the degree
of the denominator. Improper is when the degree of the numerator is either the same or higher than the degree
of the denominator.
Example
Change the improper fraction into a proper fraction using long division.
The numerator and denominator must be written in descending order of
This is as far as long division can go here as you will have to multiply with a negative powered to match
. The above improper fraction can therefore be written in terms of a whole part and a remainder (proper fraction)
DR ERASMUS MEM12A, CMA12A, EMA125C CHAPTER 6 1
With Matlab, we list the coefficients of the numerator as num=[1 0 0 0] and the
coefficients of the denominator as den=[1 0 -4]:
num=[1 0 0 0];
den=[1 0 -4];
[wh,rem]=deconv(num,den)
wh = 1×2
1 0
rem = 1×4
0 0 4 0
The whole has coefficients wh=[1 0] which is and the remainder has coefficients rem=[0 0 4 0] which
is
e) Roots of a power series: The roots of a power series enables us to calculate the factors and vice versa.
Example
Calculate the roots/zeros (and therefore the factors) of . That is, when is ?
When the degree of the power series is higher than 2, you can use the Newton Raphson recursion formula.
Substitute with values to determine the value of . When using Matlab, the power series
is arranged in descending powers of as p=[1 4 1 -6]
p=[1 4 1 -6];
roots(p)
ans = 3×1
-3.0000
-2.0000
1.0000
The factors are therefore
DR ERASMUS MEM12A, CMA12A, EMA125C CHAPTER 6 2
6.1.2 Applying partial fractions
When adding fractions, a common denominator is chosen, usually the product of all the denominators involved
which leads to a single and often complicated fraction. This section will reverse this process, separating the
single complicated fraction back to their simpler forms. The following examples will demonstrate the logic and
the reversal process.
Examples
i) Add
If you are given can you reverse back to its parts ( the two fractions it came from)?
If the degree of the power series in the numerator (top) is strictly less than the power series in the denominator
(bottom) which is the case here, follow these steps:
Step 1: Factorize the denominator . Note that the roots are . Now
you know that
Step 2: If the degree of the power series in the denominator is , place a power series of degree above. In
this case both are of degree 1 so place a 0'th degree above (constants)
Step 3: Multiply each term (left hand side and right hand side) in this equation with
Step 4: Insert the roots (also called poles) into (1) and calculate the values of A and B
Therefore . This reversal process is called partial fractions.
When using Matlab:
syms x
y(x)=(6*x-10)/(x^2-2*x-3);
partfrac(y)
ans(x) =
DR ERASMUS MEM12A, CMA12A, EMA125C CHAPTER 6 3
ii) Calculate the partial fractions for
Since the degree above (zero) is less than the degree below (three) and the denominator is already in factored
form, we can continue with the process of reverting back to the two fractions it was compiled from:
Multiply both sides with . Note that these factors have roots where
Substitute :
Substitute : If you are not comfortable using the complex roots, you can also substitute any other
value (except the already used ) such as until you have two equations that will enable you to
solve the two unknowns .
Substitute
Substitute :
syms x
y(x)=5/( (x^2+1)*(x-2));
partfrac(y)
ans(x) =
iii) Prove that when a first degree factor has multiplicity 2 that we can separate
.
Proof: As long as the numerator is of degree strictly less than the denominator which is the case here, the
numerator can be manipulated to "mimic" or copy the denominator, this is how:
DR ERASMUS MEM12A, CMA12A, EMA125C CHAPTER 6 4
Similarly it can be proved that when a first degree factor has multiplicity 3:
More examples:
iv) Calculate the integral
the root of and that of . The real root is easy to implement and we use this
one first in (2):
Substituting we have from (2) that
To avoid using complex numbers, we substitute x with other values like 0,1,-1 (we can't use 2 again) etc until we
have enough equations to solve A and B.
From (3)
Return to the integral:
Testing the integrals:
DR ERASMUS MEM12A, CMA12A, EMA125C CHAPTER 6 5
syms x
y(x)=5/((x^2+1)*(x-2));
partfrac(y)
ans(x) =
v) Calculate the integral . You will notice that the 1'st degree factor has multiplicity 2.
partial fractions:
There are two real roots :
We are shorting another x, try x=0
Back to the integral
syms x
y(x)=16/( (x-3)^2*(x+1) );
partfrac(y)
ans(x) =
You can now proceed with integration and compare your solution to the one calculated by Matlab:
DR ERASMUS MEM12A, CMA12A, EMA125C CHAPTER 6 6
ysol=int(y)
ysol(x) =
Paced Exercise (6A)
1.Calculate the time it takes an object to move through a medium if it accelerates from a velocity of 10m/s
to a velocity of 100m/s where the time taken is calculated as
• This fraction requires the application of partial fractions
• You should find that the integral simplifies to
• The above integrates to
• The time taken is
Determine the following integrals
2.1
• The solution is
2.2
• where
• The solution is
2.3
• The solution is
DR ERASMUS MEM12A, CMA12A, EMA125C CHAPTER 6 7
6.2 Integration by parts
To explain the concept of DI integration (integration by parts), the following examples are used.
Attempt to calculate
You will find that there is no choice of trial function that will resolve the above integral. The reason is that the two
parts are unrelated. If are close to zero, the Maclaurin expansion
can be used to forge an approximate value:
An exact solution for this case does however exists. It involves a clever trick where one of the two terms inside
the integral is labelled and the other as . For the above example, a good choice will be .
The integral is then . Note that the derivative (D) of is and integral (I) of is
. To understand the significance of this, observe what happens when one takes the derivative of the
product :
The hope is that the integral on the right hand side (referred to as the horizontal lock) will be easier to
solve than the original integral on the left . Choosing which part must be differentiated ( ) and which
part must be integrated will depend on the nature of the two terms. This is explained in the subsections
below. Equation (4) defines the process of integration by parts or DI integration and can be captured in the
diagram where we define the top row as . In the second row, is differentiated and is
integrated:
Term 1 is the diagonal product of (not integrated) and term 2 is the horizontal lock which is the integral
of the product of . In the processes below, a diagonal combination will always be without integration but
a horizontal combination will be with integration. If the rows extend, the signage will alternate
etc.
If term 2 is integrable, the DI process terminates with (5) but if it is not integrable, the process is repeated for
where we label and . In the DI diagram it is captured as
DR ERASMUS MEM12A, CMA12A, EMA125C CHAPTER 6 8
With
and equation (4) extending to
term 4 is the new horizontal lock. The associated DI diagram is
This process is repeated until the horizontal lock is integrable.
DR ERASMUS MEM12A, CMA12A, EMA125C CHAPTER 6 9
6.2.1 Integrals of type
Provided that is a positive whole number, choose . The reason is that consecutive derivates of will
eventually terminate in zero resulting in a zero horizontal lock.
Examples
i) Solve
If we choose ,
For a power , you must differentiate times and integrate times to reach a zero horizontal lock (
termination integral level).
ii) Calculate .
syms x
dy(x)=x*sin(2*x);
y=int(dy)
y(x) =
Note that Matlab used the identity
DR ERASMUS MEM12A, CMA12A, EMA125C CHAPTER 6 10
Paced Exercise (6B)
Calculate the volume of the object machined by rotating from about the axes if the
formula for the volume is given by
• The integral simplifies to
• Your DI table should be
• Your solution is
2. Determine the following integrals
2.1
• The DI diagram
• The solution is
DR ERASMUS MEM12A, CMA12A, EMA125C CHAPTER 6 11
2.2
• The DI diagram
• The solution is
DR ERASMUS MEM12A, CMA12A, EMA125C CHAPTER 6 12
6.2.2 Integrals of type
In these cases, neither of the two terms in the product will terminate through differentiation but both terms will
return back to their original forms after being differentiated (and integrated) twice. This corresponds to three
rows in the DI diagram with a horizontal lock which is the same type of integral as the original integral. You can
place the functions into the two columns according to preference ... which one would you rather integrate and
which one would you rather differentiate. The two solutions from different choices of will appear
different but are equivalent.
Example
i) Calculate
Both functions will return to their original form after being differentiated or integrated twice. For this example,
and but you can swop it around. In these cases you differentiate twice and integrate
twice only. The horizontal lock contains the same combination as the original integral:
For the bounded case:
syms x
dy(x)=exp(3*x)*cos(x); y=int(dy)
y(x) =
DR ERASMUS MEM12A, CMA12A, EMA125C CHAPTER 6 13
yd= eval( int(dy,0,pi/2) )
yd = 10.8318
ii) Calculate
For this example, and .
DR ERASMUS MEM12A, CMA12A, EMA125C CHAPTER 6 14
Paced Exercise (6C)
1. Calculate
• Suppose you decided to choose then
• Your solution is then
2. Calculate the volume of rotation for the volume created by rotating from
about the axes if the formula for the volume is given by
• The volume integral simplifies to
• Your DI can be
or
DR ERASMUS MEM12A, CMA12A, EMA125C CHAPTER 6 15
• For the first choice on the left
• The volume is then
3. Determine the integral
• The DI diagram
• The solution is
DR ERASMUS MEM12A, CMA12A, EMA125C CHAPTER 6 16
6.2.3 Integrals of type
In these cases you either only have one function (inverse trigonometric or inverse hyperbolic or ln) inside the
integral or a combination of and . These special cases involve functions that are easily differentiated but
not integrated. In the first case we choose and inverse trigonometric or inverse hyperbolic. In the
second case, we choose and . This type must only be differentiated (and integrated) once. The
solution equation will consist of one diagonal combination followed by the horizontal lock which should be easy
to integrate.
Examples
i) Calculate
We interpret it as the product with structure:
with
ii) Calculate
I can differentiate but I can't integrate it so interpret the content of the integral as
then
DR ERASMUS MEM12A, CMA12A, EMA125C CHAPTER 6 17
Paced Exercise (6D)
1. Calculate the volume of the 3D bowl machined by rotating about the
axes if
Rotate
• You should find that
• Your DI should be
You should find that
• Your solution is
2. Calculate the area between the curves .
• From the graph,
• To determine you must use Newton Raphson with . You
should find that
• Calculate with
DR ERASMUS MEM12A, CMA12A, EMA125C CHAPTER 6 18
• Calculate with
From 6.1 (partial fractions) must first undergo long division:
• You should find that
DR ERASMUS MEM12A, CMA12A, EMA125C CHAPTER 6 19
6.3 Trigonometric Integration
When sine and cosine functions are combined and/or raised to powers, an identity can be considered to simplify
the expression to a situation which can be integrated. Typical identities that can be used are:
Examples
i) Calculate
Combination of sine and cosine not raised to powers:
From identity 6:
In the bounded case:
syms x
dy(x)=sin(2*x)*cos(3*x);
y=int(dy)
y(x) =
yb=int(dy,0,pi/2)
yb =
DR ERASMUS MEM12A, CMA12A, EMA125C CHAPTER 6 20
ii)
Single sine or cosine raised to an odd power:
Step 1: express as highest even power times once itself
Step 2: From identity 1,
iii)
Single sine or cosine raised to an even power:
From identity 3
Calculate .
In the bounded case:
syms x
DR ERASMUS MEM12A, CMA12A, EMA125C CHAPTER 6 21
dy(x)=(sin(3*x))^2;
y=int(dy)
yb=int(dy,0,pi)
iv)
Combination of sines and cosines with same arguments but raised to powers:
Choose the odd powered term for identity intervention. If both powers are odd, choose the smaller of the two.
Step 1: Express the odd powered term as highest even power times itself
Step 2: From 1 substitute
syms x
dy(x)=(sin(2*x))^3*(cos(2*x))^2;
y=int(dy)
DR ERASMUS MEM12A, CMA12A, EMA125C CHAPTER 6 22
v) Calculate .
Combination of sines and cosines with same arguments but raised to powers:
When both powers are even, both require identity intervention. Use identities 2 and 3
syms x
dy(x)=(sin(x/2))^2*(cos(x/2))^2;
y=int(dy)
y(x) =
DR ERASMUS MEM12A, CMA12A, EMA125C CHAPTER 6 23
Paced Exercise (6E)
1. Calculate the RMS of the function over the range if
• The formula simplifies to
• The cosine is raised to an even power and is alone:
• You should find that
• The solution is
2. Calculate the volume of glass required to make a glass bowl with outer parameter defined by and
inner parameter defined by . The range in both cases is and volume formulas
• The resultant volume is calculated as
• You should find that . When sine is alone and raised to an even power
• You should find that
• You should find that
DR ERASMUS MEM12A, CMA12A, EMA125C CHAPTER 6 24
6.4 Plotting Bodies of rotation using Matlab
For a function defined over the range [ a , b] :
The Volume of a 3D object formed by rotating the 2D graph defined by (from ) around the
axes is calculated as
When drawing bodies of rotation using Matlab, the cylinder command is used. The variable is not defined as
continuous so we don't start the coding with syms x. We instead define the function as a set of discrete
coordinate points. When multiplying discrete functions in Matlab coding: x.^2 instead of just x^2. The 3D
body is represented with the x axes vertically upwards.
To demonstrate the cylinder command, we will graphically represented the volume of rotation V when rotating
the 2D graph about the axes. We will first define the coordinates that Matlab will use to generate
corresponding and coordinates. Suppose the volume I want to create is defined by the part of the graph
starting at . If a smooth graphic resolution is required, the coordinates must be plenty
and close spaced, for example in steps of from :
x = 1:0.1:3; % define coordinate spacing
[X,Y,Z] = cylinder(x.^2); % note the .*
surf(X,Y,Z)
DR ERASMUS MEM12A, CMA12A, EMA125C CHAPTER 6 25
If you instead choose a grid spacing of . You will find that the volume looks less smooth.
x = 1:1:3;
[X,Y,Z] = cylinder(x.^2);
surf(X,Y,Z)
This is how the volume of rotation plots in the Paced Exercises were generated:
In plotting the volume of the 3D bowl machined by rotating about the
axes (use h=0.1):
x = 0:0.1:1; % x coordinates spaced 0.1 units apart from 0 till 10
[X,Y,Z] = cylinder(sqrt(asin(x))); surf(X,Y,Z)
axis square
DR ERASMUS MEM12A, CMA12A, EMA125C CHAPTER 6 26
In plotting the volume of the object machined by rotating from till about the axes.
x = 1:0.1:3;
[X,Y,Z] = cylinder(x.*exp(-2*x)); % note the .* and not just *
surf(X,Y,Z)
In plotting the volume of glass required to make a glass bowl with outer parameter defined by and
inner parameter defined by .
x = 0:0.1:2;
[X,Y,Z] = cylinder(2*sin(x));
surf(X,Y,Z)
hold on
[X,Y,Z] = cylinder(sqrt(x));
surf(X,Y,Z)
hold off
axis square
DR ERASMUS MEM12A, CMA12A, EMA125C CHAPTER 6 27