MEMO ENGINEERING MATHEMATICS 3 RE ASSESSMENT 2023
Instructions TOTAL: 100 TIME: 3 hours
Do all your calculations in this book.
1.1 What does the first term in the Fourier series of a periodic function f(x) over the periodic
interval calculate/determine? [2]
The first term is the average value that the function has over one period and serves as the imaginary axes about
which the periodic function oscillates.
1.2 Draw the main window (the period shown) and the window (period) to the left in the range
of the periodic function below. [3]
syms t
H=@(t) heaviside(t);
f(t)=0*(H(t+1)-H(t))+(2*t+2)*(H(t)-H(t-1));
fplot(f,[-1,1])
hold on
f(t)=0*(H(t+3)-H(t+2))+(2*(t+2)+2)*(H(t+2)-H(t+1));
fplot(f,[-3,-1])
hold off
EXAMINER MODERATOR MEM21A/CMA21A/EMA216C 1
MEMO ENGINEERING MATHEMATICS 3 RE ASSESSMENT 2023
1.3 Calculate the Fourier series (show the first three harmonics) of the periodic function in 1.2. What do
you notice about the values of and what concerns their magnitudes? [15]
syms t n
H=@(t) heaviside(t);
f(t)=0*(H(t+1)-H(t))+(2*t+2)*(H(t)-H(t-1));
T=2; w=2*n*pi/T;
Ao=(1/T)*int(f,-1,1)
Ao =
an=(2/T)*int(f*cos(w*t),-1,1)
an =
bn=(2/T)*int(f*sin(w*t),-1,1)
bn =
EXAMINER MODERATOR MEM21A/CMA21A/EMA216C 2
MEMO ENGINEERING MATHEMATICS 3 RE ASSESSMENT 2023
for n=1:3
a(n)=eval(an);
b(n)=eval(bn);
end
[a;b]
ans = 2×3
-0.4053 -0.0000 -0.0450
1.9099 -0.3183 0.6366
The A's decrease
1.4. Calculate the expression for the complex Fourier coefficient for the periodic function below.
[10]
syms t n
H=@(t) heaviside(t);
f=1*(H(t)-H(t-pi/2));T=2*pi; j=sqrt(-1); w=-2*n*j*pi/T;
cn=(1/T)*int(f*exp(w*t),0,2*pi); Cn=vpa(cn,3)
EXAMINER MODERATOR MEM21A/CMA21A/EMA216C 3
MEMO ENGINEERING MATHEMATICS 3 RE ASSESSMENT 2023
Cn =
2.1
i) How would you model the load placed on a beam of long with the following characteristics:
It has a uniform load of from to and a point load of at
.
ii) How would you model a power supply of that is switched on after 4 seconds but remains
on.
[5]
2.2 Use the complimentary and particular solution method to solve the forced spring mass damper
system below.
Note that this system will experience resonance and you must therefore make the particular choice
Calculate the steady state of the motion. [10]
syms x(t)
dx=diff(x);dx2=diff(x,2);
eq=dx2+5*dx+6*x==10*exp(-2*t);
xg(t)=dsolve(eq)
xg(t) =
x(t)=dsolve(eq,x(0)==0,dx(0)==0)
x(t) =
EXAMINER MODERATOR MEM21A/CMA21A/EMA216C 4
MEMO ENGINEERING MATHEMATICS 3 RE ASSESSMENT 2023
The steady state is
2.3 Convert the differential equation into a sate-space equation and use
eigenvalues and eigenvectors to determine the general solution to this differential equation. [10]
syms x(t)
dx=diff(x);dx2=diff(x,2);
eq=2*dx2+4*dx+8*x==6;
xg(t)=dsolve(eq)
xg(t) =
EXAMINER MODERATOR MEM21A/CMA21A/EMA216C 5
MEMO ENGINEERING MATHEMATICS 3 RE ASSESSMENT 2023
2.4 A concentrated weight is hung from the centre of a beam with flexural rigidity and length
. Assume with initial conditions
Solve the beam equation using the Laplace transform and determine the deflection at in
terms of . [15]
The differential equation is
Apply the Laplace transform
With the given initial conditions this reduces to
Write as Laplace transforms
The last two terms on the right hand side above need no further intervention but the first term does as
the exponential is blocking the inverse Laplace action. For , let then the
above has representation
EXAMINER MODERATOR MEM21A/CMA21A/EMA216C 6
MEMO ENGINEERING MATHEMATICS 3 RE ASSESSMENT 2023
The inverse L transform can now be taken
At
3. The one dimensional linear advection equation describes the constant movement of a
distribution of of pollutant in the direction. Solve the advection equation in terms of its
general solution. [10]
EXAMINER MODERATOR MEM21A/CMA21A/EMA216C 7
MEMO ENGINEERING MATHEMATICS 3 RE ASSESSMENT 2023
4.1 The Van der Pol equation has a long history of being used in both the physical and biological
sciences and models a non-conservative system in which energy is added to and subtracted from the
system resulting in a periodic motion called a limit cycle. It has system form:
Assume initial conditions and solve the system using the Runge-Kutta
method of order 4. Choose an interval of and generate the solutions .
Assign the K's in the RK4 method to the evaluation of and the L's to the evaluation of . [10]
f=@(t,X,Y) Y;
g=@(t,X,Y) 2*(1-X^2)*Y-X;
t=0:0.5:0.5; h=0.5; X(1)=1; Y(1)=1;
N=(0.5-0)/h;
for i=1:N
k1=f(t(i),X(i),Y(i)); l1=g(t(i),X(i),Y(i));
k2=f(t(i)+h/2,X(i)+h*k1/2,Y(i)+h*l1/2); l2=g(t(i)+h/2,X(i)+h*k1/2,Y(i)+h*l1/2);
k3=f(t(i)+h/2,X(i)+h*k2/2,Y(i)+h*l2/2); l3=g(t(i)+h/2,X(i)+h*k2/2,Y(i)+h*l2/2);
k4=f(t(i)+h,X(i)+h*k3,Y(i)+h*l3); l4=g(t(i)+h,X(i)+h*k3,Y(i)+h*l3);
X(i+1)=X(i)+(h/6)*(k1+2*k2+2*k3+k4); Y(i+1)=Y(i)+(h/6)*(l1+2*l2+2*l3+l4);
Zk(1:4,i)=[k1;k2;k3;k4]; Zl(1:4,i)=[l1;l2;l3;l4];
end
n1=[Zk(1:4,1) Zl(1:4,1)] %list of k and l values for n=1
n1 = 4×2
1.0000 -1.0000
0.7500 -2.0938
0.4766 -1.5784
0.2108 -1.4631
[X;Y] %top row is X and bottom row is Y
ans = 2×2
1.0000 1.3053
1.0000 0.1827
0.13*16
ans = 2.0800
4.2 A cup of coffee is freshly made. It is put on the breakfast table outside where the temperature is 16
degrees Celsius. Determine the temperature of the coffee after 1 minute by recursing the model
twice at intervals minutes, that is, calculate . Use the Taylor method of
order two.
EXAMINER MODERATOR MEM21A/CMA21A/EMA216C 8
MEMO ENGINEERING MATHEMATICS 3 RE ASSESSMENT 2023
[10]
clear all
f1=@(t,T) -0.13*T+2;
f2=@(t,T) -0.13*(-0.13*T+2);
h=0.5; T(1)=98; t=0:0.5:1;
N=round((1-0)/h);
for n=1:N
T(n+1)=T(n)+h*f1(t(n),T(n))+(h/2)*f2(t(n),T(n));
end
T
T = 1×3
98.0000 92.9791 88.2632
EXAMINER MODERATOR MEM21A/CMA21A/EMA216C 9
MEMO ENGINEERING MATHEMATICS 3 RE ASSESSMENT 2023
EXAMINER MODERATOR MEM21A/CMA21A/EMA216C 10