M2 Chapter6
M2 Chapter6
(constants only)
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.
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)
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
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
syms x
y(x)=(6*x-10)/(x^2-2*x-3);
partfrac(y)
ans(x) =
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:
More examples:
the root of and that of . The real root is easy to implement and we use this
one first in (2):
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)
ans(x) =
v) Calculate the integral . You will notice that the 1'st degree factor has multiplicity 2.
partial fractions:
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:
ysol(x) =
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
2.1
• The solution is
2.2
• where
• The solution is
2.3
• The solution is
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
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
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) =
Calculate the volume of the object machined by rotating from about the axes if the
formula for the volume is given by
• Your solution is
• The DI diagram
• The solution is
• The DI diagram
• The solution is
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:
syms x
dy(x)=exp(3*x)*cos(x); y=int(dy)
y(x) =
yd = 10.8318
ii) Calculate
1. Calculate
2. Calculate the volume of rotation for the volume created by rotating from
or
• The DI diagram
• The solution is
Examples
i) Calculate
with
ii) Calculate
I can differentiate but I can't integrate it so interpret the content of the integral as
then
Rotate
• Your solution is
Examples
i) Calculate
Combination of sine and cosine not raised to powers:
From identity 6:
syms x
dy(x)=sin(2*x)*cos(3*x);
y=int(dy)
y(x) =
yb=int(dy,0,pi/2)
yb =
iii)
From identity 3
Calculate .
syms x
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
syms x
dy(x)=(sin(2*x))^3*(cos(2*x))^2;
y=int(dy)
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) =
• 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 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: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:
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
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