Nothing Special   »   [go: up one dir, main page]

APM 2611 Tut Letter 101

Download as pdf or txt
Download as pdf or txt
You are on page 1of 41

APM2611/101/3/2018

Tutorial letter 101/3/2018

DIFFERENTIAL EQUATIONS
APM2611

Semesters 1 & 2

Department of Mathematical Sciences

IMPORTANT INFORMATION:
This tutorial letter contains important information about your
module.

BARCODE

university
Define tomorrow. of south africa
CONTENTS

Page

1 INTRODUCTION ..................................................................................................................4
1.1 my Unisa ...............................................................................................................................4
1.2 Tutorial matter.......................................................................................................................4
2 PURPOSE AND OUTCOMES FOR THE MODULE ............................................................4
2.1 Purpose ................................................................................................................................4
2.2 Outcomes .............................................................................................................................5
3 LECTURER(S) AND CONTACT DETAILS ..........................................................................5
3.1 Lecturer(s) ............................................................................................................................5
3.2 Department ..........................................................................................................................6
3.3 University..............................................................................................................................6
4 RESOURCES.......................................................................................................................6
4.1 Prescribed books..................................................................................................................6
4.2 Recommended books ..........................................................................................................6
4.3 Electronic reserves (e-Reserves) .........................................................................................6
4.4 Library services and resources information .........................................................................6
5 STUDENT SUPPORT SERVICES .......................................................................................7
6 STUDY PLAN.......................................................................................................................7
7 PRACTICAL WORK AND WORK INTEGRATED LEARNING............................................7
8 ASSESSMENT.....................................................................................................................8
8.1 Assessment criteria ..............................................................................................................8
8.2 Assessment plan ..................................................................................................................8
8.3 Assignment numbers............................................................................................................8
8.3.1 General assignment numbers ..............................................................................................8
8.3.2 Unique assignment numbers................................................................................................8
8.3.3 Assignment due dates..........................................................................................................8
8.4 Submission of assignments..................................................................................................8
8.5 The assignments ..................................................................................................................9
8.6 Other assessment methods .................................................................................................9
8.7 The examination ...................................................................................................................9

2
APM2611/101/3/2018

9 FREQUENTLY ASKED QUESTIONS................................................................................10


10 IN CLOSING ......................................................................................................................10
ADDENDUM A: ASSIGNMENTS – FIRST SEMESTER ..............................................................11
ADDENDUM B: ASSIGNMENTS – SECOND SEMESTER .........................................................15
ADDENDUM C: USEFUL COMPUTER SOFTWARE ..................................................................19
ADDENDUM D: DIFFERENTIAL EQUATIONS USING MAXIMA ................................................20
D.1 The contrib ode package ..............................................................................................20
D.2 Solving differential equations..............................................................................................20
D.3 Partial fraction decomposition ............................................................................................21
D.4 Laplace transform...............................................................................................................22
D.5 Fourier transform ................................................................................................................23
D.6 Some assignment type questions with solutions................................................................25
D.6.1 Assignment 1 type..............................................................................................................25
D.6.2 Assignment 2 type..............................................................................................................35

3
1 INTRODUCTION
Dear Student

Welcome to the APM2611 module in the Department of Mathematical Sciences at Unisa. We trust
that you will find this module both interesting and rewarding.

Some of this tutorial matter may not be available when you register. Tutorial matter that is not
available when you register will be posted to you as soon as possible, but is also available on
myUnisa.

1.1 myUnisa
You must be registered on myUnisa (http://my.unisa.ac.za) to be able to submit assignments
online, gain access to the library functions and various learning resources, download study ma-
terial, “chat” to your lecturers and fellow students about your studies and the challenges you en-
counter, and participate in online discussion forums. myUnisa provides additional opportunities to
take part in activities and discussions of relevance to your module topics, assignments, marks and
examinations.

1.2 Tutorial matter


A tutorial letter is our way of communicating with you about teaching, learning and assessment.
You will receive a number of tutorial letters during the course of the module. This particular tutorial
letter contains important information about the scheme of work, resources and assignments for this
module as well as the admission requirements for the examination. We urge you to read this and
subsequent tutorial letters carefully and to keep it at hand when working through the study material,
preparing and submitting the assignments, preparing for the examination and addressing queries
that you may have about the course (course content, textbook, worked examples and exercises,
theorems and their applications in your assignments, tutorial and textbook problems, etc.) to your
APM2611 lecturers.

2 PURPOSE AND OUTCOMES FOR THE MODULE


2.1 Purpose
This module will be useful to students interested in developing those skills in modeling physical
problems using differential equations and then solving them. Indeed, these techniques can be
used in the natural, economic, social and mathematical sciences and have been central to our
understanding of the world since Newton developed the idea of a differential equation nearly 350
years ago. Students who successfully complete this module will have a knowledge of those basic
techniques required to recognise and solve certain types of well-known and commonly appearing
differential equations. Also, you will be able to use differential equations to model, explain and
predict the behaviour of certain physical processes.

4
APM2611/101/3/2018

2.2 Outcomes
2.2.1 Classify and recognise the basic types of differential equations
(Prescribed textbook, chapter 1).

2.2.2 Solve specific types of differential equations


(Prescribed textbook, chapter 2 and chapter 4).

2.2.3 Use differential equations to model practical situations


(Prescribed textbook, chapter 3).

2.2.4 Perform basic operations on infinite series


(Prescribed textbook, chapter 6).

2.2.5 Use Fourier Series and Laplace Transform


(Prescribed textbook, chapter 7 and chapter 11).

2.2.6 Solve a partial differential equation using separation of variables


(Prescribed textbook, chapter 12).

3 LECTURER(S) AND CONTACT DETAILS


3.1 Lecturer(s)
The contact details for the lecturer responsible for this module is

Postal address: The APM2611 Lecturers


Department of Mathematical Sciences
Private Bag X6
Florida
1709
South Africa
For 2018 the lecturer is:
Dr Emile Franc D. Goufo .
dgoufef@unisa.ac.za, Tel: +27 11 670 9159, Fax: +27 11 670 9171.
Office: GJ Gerwel C6-38, Science Campus, Florida
Additional contact details for the module lecturers will be provided in a subsequent tutorial letter.

All queries that are not of a purely administrative nature but are about the content of this module
should be directed to your lecturer(s). Tutorial letter 301 will provide additional contact details for
your lecturer. Please have your study material with you when you contact your lecturer by tele-
phone. If you are unable to reach us, leave a message with the departmental secretary. Provide
your name, the time of the telephone call and contact details. If you have problems with questions
that you are unable to solve, please send your own attempts so that the lecturers can determine
where the fault lies.

Please note: Letters to lecturers may not be enclosed with or inserted into assignments.

5
3.2 Department
The contact details for the Department of Mathematical Sciences are:

Departmental Secretary: (011) 670 9147 (SA) +27 11 670 9147 (International)

3.3 University
If you need to contact the University about matters not related to the content of this module, please
consult the publication Study @ Unisa that you received with your study material. This booklet
contains information on how to contact the University (e.g. to whom you can write for different
queries, important telephone and fax numbers, addresses and details of the times certain facilities
are open). Always have your student number at hand when you contact the University.

4 RESOURCES
4.1 Prescribed books
Prescribed books can be obtained from the University’s official booksellers. If you have difficulty
locating your book(s) at these booksellers, please contact the Prescribed Books Section at (012)
429 4152 or e-mail vospresc@unisa.ac.za.

Your prescribed textbook for this module is:

Title: Differential Equations with Boundary-Value Problems


Authors: Dennis G. Zill and Warren S. Wright
Edition: International Edition - 8th edition
Publishers: Cengage Learning (Brooks/Cole)
ISBN: 9781133492467
Please buy the textbook as soon as possible since you have to study from it directly – you cannot
do this module without the prescribed textbook.

4.2 Recommended books


The book “Elementary Differential Equations with Boundary Value Problems” by William F. Trench
and the corresponding solutions manual are available for free at the following web sites:

http://digitalcommons.trinity.edu/mono/9/
http://digitalcommons.trinity.edu/mono/10/

4.3 Electronic reserves (e-Reserves)


There are no e-Reserves for this module.

4.4 Library services and resources information


For brief information go to:
http://www.unisa.ac.za/brochures/studies

6
APM2611/101/3/2018

For more detailed information, go to the Unisa website: http://www.unisa.ac.za/, click on Li-
brary. For research support and services of Personal Librarians, go to:
http://www.unisa.ac.za/Default.asp?Cmd=ViewContent&ContentID=7102

The Library has compiled numerous library guides:

• find recommended reading in the print collection and e-reserves


- http://libguides.unisa.ac.za/request/undergrad

• request material
- http://libguides.unisa.ac.za/request/request

• postgraduate information services


- http://libguides.unisa.ac.za/request/postgrad

• finding , obtaining and using library resources and tools to assist in doing research
- http://libguides.unisa.ac.za/Research_Skills

• how to contact the Library/find us on social media/frequently asked questions


- http://libguides.unisa.ac.za/ask

5 STUDENT SUPPORT SERVICES


For information on the various student support services available at Unisa (e.g. student counseling,
tutorial classes, language support), please consult the publication Study @ Unisa that you received
with your study material.

6 STUDY PLAN
The following table provides an outline of the outcomes and ideal dates of completion, and other
study activities.

Semester 1 Semester 2
Outcome 2.2.1 – 2.2.3 to be achieved by 1 March 2018 15 August 2018
Outcome 2.2.4 – 2.2.6 to be achieved by 4 April 2018 19 September 2018
Work through previous exam paper by 25 April 2018 10 October 2018
Revision

See the brochure Study @ Unisa for general time management and planning skills.

7 PRACTICAL WORK AND WORK INTEGRATED LEARNING


There are no practicals for this module.

7
8 ASSESSMENT
8.1 Assessment criteria
8.2 Assessment plan
A final mark of at least 50% is required to pass the module. If a student does not pass the module
then a final mark of at least 40% is required to permit the student access to the supplementary
examination. The final mark is composed as follows:

Year mark Final mark


Assignment 01: 50% −→ Year mark: 20%
Assignment 02: 50% Exam mark: 80%

Please note: if you fail the examination with less than 40%, the year mark will not be used, i.e.
the exam counts 100% towards your final mark.

8.3 Assignment numbers


8.3.1 General assignment numbers
The assignments for this module are Assignment 01, Assignment 02, etc.

8.3.2 Unique assignment numbers


Please note that each assignment has a unique assignment number which must be written on the
cover of your assignment.

8.3.3 Assignment due dates


The dates for the submission of the assignments are listed in the relevant ADDEMDUM here below.

8.4 Submission of assignments


You may submit written assignments either by post or electronically via myUnisa. Assignments
may not be submitted by fax or e-mail.

8
APM2611/101/3/2018

For detailed information on assignments, please refer to the Study @ Unisa


brochure which you received with your study package.

Please make a copy of your assignment before you submit!

To submit an assignment via myUnisa:

• Go to my Unisa.

• Log in with your student number and password.

• Select the module.

• Click on “Assignments” in the menu on the left-hand side of the screen.

• Click on the assignment number you wish to submit.

• Follow the instructions.

8.5 The assignments


Please make sure that you submit the correct assignments for the 1st semester, 2nd semester or
year module for which you have registered. For each assignment there is a fixed closing date,
the date at which the assignment must reach the University. When appropriate, solutions for each
assignment will be dispatched, as Tutorial Letter 201 (solutions to Assignment 01) and Tutorial
Letter 202 (solutions to Assignment 02) etc., a few days after the closing date. They will also be
made available on my Unisa. Late assignments will not be marked!

Note that Assignment 01 is the compulsory assignment for admission to the examination
and must reach us by the due date.

8.6 Other assessment methods


There are no other assessment methods for this module.

8.7 The examination


During the relevant semester, the Examination Section will provide you with information regarding
the examination in general, examination venues, examination dates and examination times. For
general information and requirements as far as examinations are concerned, see the brochure
Study @ Unisa which you received with your study material.

Registered for . . . Examination period Supplementary examination period


1st semester module May/June 2018 October/November 2018
2nd semester module October/November 2018 May/June 2019
Year module January/February 2019 May/June 2019

9
9 FREQUENTLY ASKED QUESTIONS
The Study @ Unisa brochure contains an A–Z guide of the most relevant study information.

10 IN CLOSING
We hope that you will enjoy APM2611 and we wish you all the best in your studies at Unisa!

10
APM2611/101/3/2018

ADDENDUM A: ASSIGNMENTS – FIRST SEMESTER

ASSIGNMENT 01
Due date: Wednesday, 7 March 2018
UNIQUE ASSIGNMENT NUMBER: 835495

ONLY FOR SEMESTER 1

First order separable, linear, Bernoulli, exact and homogeneous equations. Higher order
homogeneous DE’s. Solving non-homogeneous DE’s using the undetermined
coefficients, variation of parameters and operator methods.

Answer all the questions. Show all your workings.

If you choose to submit via my Unisa, note that only PDF files will be accepted.

Note that only some questions will be marked. However, it is highly recommended to attempt all
questions since the questions you leave undone might be the chosen ones, giving you ZeRo mark.
The questions which will be marked will not be announced in advance.

Question 1

Solve the following differential equations:


dy
(1.1) x2 dx + 2xy = 5y 3 , where x > 0.

dy xy−y 2
(1.2) dx
= x2 −y 2

(1.3) (6xy − y 3 )dx + (4y + 3x2 − 3xy 2 )dy = 0.

dy
(1.4) x dx + 4y = x3 − x, where x > 0.

dy
(1.5) x2 dx = y 2 + 2y + 1, where x > 0.

dy
(1.6) − y = xy 5 . ()
dx

Question 2

Consider the DE
y 00 − y = e2x .
Using the method of variation of parameters,

(2.1) Find a solution for the homogeneous part of the DE.

(2.2) Find a particular solution.

11
(2.3) Write down the general solution for the DE. ()

Question 3

Solve the following differential equation and determine the interval of validity of the solution:
dy 1
= 6y 2 x, y(1) = .
dx 25

Question 4

Using the method of variation of parameters find the general solution of the differential equation

x2 y 00 + xy 0 − y = x,

given that y1 = x and y2 = 1/x are solutions of the corresponding homogeneous equation.

Question 5

Radium decomposes at a rate proportional to the quantity of radium present. Suppose that it is found
that in 30 years approximately 1.5% of a certain quantity of radium has decomposed. Determine
approximately how long it will take for one-half of the original amount of radium to decompose.

– End of assignment –

12
APM2611/101/3/2018

ASSIGNMENT 02
Due date: Wednesday, 11 April 2018
UNIQUE ASSIGNMENT NUMBER: 840402

ONLY FOR SEMESTER 1

Series solutions, Laplace transforms and Fourier series, solving PDE’s by separation of
variables.

Answer all the questions. Show all your workings.

If you choose to submit via my Unisa, note that only PDF files will be accepted.

Note that only some questions will be marked. However, it is highly recommended to attempt all
questions since the questions you leave undone might be the chosen ones, giving you ZeRo mark.
The questions which will be marked will not be announced in advance.

Question 1

Use the power series method to solve the initial value problem:
(x2 + 1)y 00 − 6xy 0 + 12y = 0; y(0) = 1, y 0 (0) = 1.

Question 2

Calculate the Laplace transform of the following functions:

(2.1) t sin 2t.

(2.2) (2t + 1)U(t − 1).


Z t
(2.3) t τ e−τ dτ .
0

Question 3

Calculate the Laplace transform of the following function from first principles:
(
cos t 0 ≤ t < π
f (t) =
0 t≥π

Question 4

Calculate the following inverse Laplace transforms:


 
−1 2s + 1
(4.1) L ()
s2 + 4s + 13

13
e−2s
 
−1
(4.2) L ()
s−2

Question 5

Solve the following initial value problem by using Laplace transforms:

x00 (t) + 5x0 (t) + 6x(t) = e−2t , x(0) = 1, x0 (0) = −2.

Question 6

Compute the Fourier series for


x+π on (−π, π).

Question 7

Use separation of variables to find a product solution of the following partial differential equation
(other than u(x, y) = 0):
∂u ∂u
+ =u
∂x ∂y

– End of assignment –

14
APM2611/101/3/2018

ADDENDUM B: ASSIGNMENTS – SECOND SEMESTER

ASSIGNMENT 01
Due date: Wednesday, 22 August 2018
UNIQUE ASSIGNMENT NUMBER: 751360

ONLY FOR SEMESTER 2

First order separable, linear, Bernoulli, exact and homogeneous equations. Higher order
homogeneous DE’s. Solving non-homogeneous DE’s using the undetermined
coefficients, variation of parameters and operator methods.

Answer all the questions. Show all your workings.

If you choose to submit via my Unisa, note that only PDF files will be accepted.

Note that only some questions will be marked. However, it is highly recommended to attempt all
questions since the questions you leave undone might be the chosen ones, giving you ZeRo mark.
The questions which will be marked will not be announced in advance.

Question 1

Solve the following differential equations:

(1.1) 2(y + 3)dx − xydy = 0.

(1.2) (x2 − xy + y 2 )dx − xydy = 0.

(1.3) 3x(xy − 2)dx + (x3 + 2y)dy = 0. ()

dy 3x + 4y − 1
(1.4) =− . ()
dx 3x + 4y + 2

dy
(1.5) + 2xy = 3x. ()
dx
dy
(1.6) + 2xy + xy 4 = 0. ()
dx

Question 2

(2.1) Solve the following boundary value problem:

y 00 − 2y 0 − 3y = 0, y(0) = 4, y 0 (0) = 0

15
(2.2) Use the method of undetermined coefficients to solve the following differential equation:

y 00 − 4y 0 + 3y = 2 cos x + 4 sin x.

Question 3

Solve the following differential equation and determine the interval of validity of the solution:

dy xy 3
=√ , y(0) = −1.
dx 1 + x2

Question 4

Using the method of variation of parameters find the general solution of the differential equation

x2 y 00 − 3xy 0 + 3y = 12x4 ,

given that y1 = x and y2 = x3 are solutions of the corresponding homogeneous equation.

Question 5

A tank contains 300 litres of fluid in which 20 grams of salt is dissolved. Brine containing 1 gram of
salt per litre is then pumped into the tank at a rate of 4 litres per minute; the well-mixed solution is
then pumped out at the same rate. Find the number N (t) of grams of salt in the tank at time t.

– End of assignment –

16
APM2611/101/3/2018

ASSIGNMENT 02
Due date: Wednesday, 26 September 2018
UNIQUE ASSIGNMENT NUMBER: 892122

ONLY FOR SEMESTER 2

Series solutions, Laplace transforms and Fourier series, solving PDE’s by separation of
variables.

Answer all the questions. Show all your workings.

If you choose to submit via my Unisa, note that only PDF files will be accepted.

Note that only some questions will be marked. However, it is highly recommended to attempt all
questions since the questions you leave undone might be the chosen ones, giving you ZeRo mark.
The questions which will be marked will not be announced in advance.

Question 1

Use the power series method to solve the initial value problem:
(1 − x2 )y 00 − 6xy 0 − 4y = 0; y(0) = 1, y 0 (0) = 2.

Question 2

Calculate the Laplace transform of the following functions:

(2.1) t2 sin t. ()

(2.2) t2 U(t − 2). ()


t
1 − e−u
Z
(2.3) du. ()
0 u

Question 3

Calculate the Laplace transform of the following function from first principles:
(
t 0≤t<4
f (t) =
5 t≥4

Question 4: Marks

Calculate the following inverse Laplace transforms:

(4.1) L−1 s2 −4s+20


 6s−4
()

17
(4.2) L−1 ln 1 + 1
 
s2
()

Question 5: Marks

Solve the following initial value problem by using Laplace transforms:

y 00 (t) + 9y = cos 3t, y(0) = 2, y 0 (0) = 5.

Question 6: Marks

Compute the Fourier series for the function


(
0 −1 ≤ x ≤ 0
f (x) =
x 0≤x≤1

on [−1, 1].

Question 7: Marks

Using the method of separation of variables, solve the following boundary value problem:
∂u ∂u
=4 ; u(0, y) = 8e−3y .
∂x ∂y

– End of assignment –

18
APM2611/101/3/2018

ADDENDUM C: USEFUL COMPUTER SOFTWARE


It is possible to check the correctness of your calculations by hand. If you are interested in software
that may help to check your results please consult the following resources. Note however that the
software will not be available at exam time, so it is recommended to be proficient at
checking your own results by hand.

Maxima:
http://maxima.sourceforge.net/
http://maxima.sourceforge.net/docs/intromax/intromax.html
http://maxima.sourceforge.net/docs/manual/en/maxima_44.html

Maxima is also available for Android devices:


https://sites.google.com/site/maximaonandroid/

See addendum D for a brief introduction to Maxima for differential equations.

Wolfram Alpha:
http://www.wolframalpha.com/
http://www.wolframalpha.com/examples/DifferentialEquations.html

Please note that the use of software is not required for this module.

19
ADDENDUM D: DIFFERENTIAL EQUATIONS USING MAXIMA
A complete guide to Maxima is beyond the scope of this module. Here we list only the most essential
features. Please consult http://maxima.sourceforge.net/ for documentation on Maxima.

Please note that the use of software is not required for this module.

D.1 The contrib ode package


First we load the package contrib_ode. Type only the line following (%i1) in the white boxes, i.e.
load(contrib ode);
(%i1) load(contrib_ode);

(%o1) /usr/maxima/5.29/share/contrib/diffequations/contrib_ode.mac

The output (%o1) may be different, but there should be no error messages. Note the semicolon ;
after every command.

D.2 Solving differential equations


Consider the differential equation (initial value problem)

y 00 − 2y 0 + 2y = e2x (cos x − 3 sin x), y(0) = 0, y 0 (0) = 1.

The derivative y 0 is written as diff(y,x) in Maxima, and the second derivative is written as diff(y,x,2).
However, we must first state that y is the dependent variable:
(%i2) depends(y,x);

(%o2) [y(x)]

Now we input the differential equation. The number e is written in maxima as %e:
(%i3) contrib_ode(diff(y,x,2) - 2*diff(y,x) + 2*y
= %e^(2*x)*(cos(x) - 3*sin(x)), y, x);

2 x 2 x
x %e sin(x) - 7 %e cos(x)
(%o3) [y = %e (%k1 sin(x) + %k2 cos(x)) - -----------------------------]
5

Type carefully to reproduce the input (%i3) correctly. Note that xy is written as x^y, and that
multiplication has to be written explicitly, i.e. xy is written as x*y. The constants of integration are
%k1 and %k2. We solve for them from the initial conditions y(0) = 0 and y 0 (0) = 1:
(%i4) append(subst([y=0,x=0], %o3),
subst([diff(y,x)=1,x=0], diff(%o3,x)));

20
APM2611/101/3/2018

7 13
(%o4) [0 = %k2 + -, 1 = %k2 + %k1 + --]
5 5
Here append is used to combine the two equations into a system of equations (in Maxima: a list of
equations). The operation subst performs the substitutions. The order is important! We substitute
first y(x) = 0 and then x = 0 into the equation. The second subst operation implements y 0 (0) = 1.
Since %o3 is the equation for y, we simply differentiate both sides of the equation i.e. diff(%o3,x).
Then we again substitute (in order!) y 0 (x) = 1 and x = 0. Now we can solve for the constants of
integration:
(%i5) solve(%, [%k1, %k2]);

1 7
(%o5) [[%k1 = - -, %k2 = - -]]
5 5
Here % means the last result, i.e. %o4. To obtain the final solution, we substitute the constants of
integration into the equation for y:
(%i6) subst(%, %o3);

2 x 2 x
x sin(x) 7 cos(x) %e sin(x) - 7 %e cos(x)
(%o6) [y = %e (- ------ - --------) - -----------------------------]
5 5 5
In other words, the solution is
ex e2x
y=− (sin(x) + 7 cos(x)) − (sin(x) − 7 cos(x)).
5 5

D.3 Partial fraction decomposition


Suppose we wish to find the partial fraction decomposition of
5s + 2
s2 + 3s + 2
This can be achieved as follows.
(%i7) partfrac((5*s+2)/(s^2+3*s+2), s);

8 3
(%o7) ----- - -----
s + 2 s + 1
The s here (in partfrac(..., s)) is the variable over which the fractions are split. For example, in
as + 2
s2 + 3s + 2
we have two variables (a and s) but we want the partial fraction decomposition over s:

21
(%i8) partfrac((a*s+2)/(s^2+3*s+2), s);

2 a - 2 2 - a
(%o8) ------- + -----
s + 2 s + 1

D.4 Laplace transform


Consider again the differential equation (initial value problem)

y 00 − 2y 0 + 2y = e2t (cos t − 3 sin t), y(0) = 0, y 0 (0) = 1.

Let’s remove the dependency of y on x:


(%i9) remove(y, dependency);

(%o9) done

Now we take the Laplace transform on both sides of the differential equation
(%i10) laplace(diff(y(t),t,2) - 2*diff(y(t),t) + 2*y(t)
= %e^(2*t)*(cos(t) - 3*sin(t)), t, s);

!
d !
(%o10) - -- (y(t))! - 2 (s laplace(y(t), t, s) - y(0))
dt !
!t = 0
2
+ s laplace(y(t), t, s) + 2 laplace(y(t), t, s) - y(0) s
s - 5
= ------------
2
s - 4 s + 5

Substituting in the initial values


(%i11) subst([y(0)=0, diff(y(t),t)=1],%);

2
(%o11) s laplace(y(t), t, s) - 2 s laplace(y(t), t, s)

s - 5
+ 2 laplace(y(t), t, s) - 1 = ------------
2
s - 4 s + 5

yields an algebraic equation for Y (s) (denoted here by laplace(y(t), t, s)). So we solve for Y (s)

22
APM2611/101/3/2018

(%i12) solve(%, laplace(y(t),t,s));

2
s - 3 s
(%o12) [laplace(y(t), t, s) = -----------------------------]
4 3 2
s - 6 s + 15 s - 18 s + 10

Once again we have a list of (one) solutions. Applying the inverse laplace transform will yield the
solution in t:
(%i13) ilt(first(%), s, t);

2 t 7 cos(t) sin(t) t sin(t) 7 cos(t)


(%o13) y(t) = %e (-------- - ------) + %e (- ------ - --------)
5 5 5 5

In other words, the solution is


e2t et
y= (7 cos(t) − sin(t)) − (sin(t) + 7 cos(t)).
5 5
Compare this result to our first example above.

For piecewise defined functions we need the unit step function U (x). In Maxima, the unit step
function is written unit_step(x).

D.5 Fourier transform


First we load the package fourie.
(%i14) load(fourie);

(%o14) /usr/pkg/share/maxima/5.32.1/share/calculus/fourie.mac

Now we can calculate the coefficients for the Fourier transform. Consider the Fourier transform of
f (x) = 2x on (−1, 1). Thus we type fourier(f (x),x,p) for the interval (−p, p) (and in our case
p = 1).
(%i15) fourier(2*x,x,1);

(%t15) a = 0
0

(%t16) a = 0
n

2 sin(%pi n) 2 cos(%pi n)
(%t17) b = 2 (------------ - ------------)
n 2 2 %pi n

23
%pi n

(%o17) [%t15, %t16, %t17]

The variable %t15 is a temporary variable introduced during the Fourier transform. Obviously bn can
be simplified, we use foursimp to do so.
(%i18) foursimp(%);

(%t18) a = 0
0

(%t19) a = 0
n

n
4 (- 1)
(%t20) b = - --------
n %pi n

(%o20) [%t18, %t19, %t20]

It is clear that f (x) = 2x is an odd function, so we can instead find the coefficients of the Fourier sine
series using foursin.
(%i21) foursin(2*x,x,1);

2 sin(%pi n) 2 cos(%pi n)
(%t21) b = 2 (------------ - ------------)
n 2 2 %pi n
%pi n

(%o21) [%t21]

(%i22) foursimp(%);

n
4 (- 1)
(%t22) b = - --------
n %pi n

(%o22) [%t22]

For an even function we can compute the coefficients of the Fourier cosine series using fourcos in a
similar way.

24
APM2611/101/3/2018

D.6 Some assignment type questions with solutions


D.6.1 Assignment 1 type

Question 8: Marks

Solve the following differential equation by separating the variables:


dy
= xy 3 .
dx
dy
Rewriting the equation as y3
= xdx, we get
Z Z Z Z
dy −3
= xdx or y dy = xdx,
y3
giving
1 −2 1 2
y = x + c1 .
−2 2
Hence, the solution of the differential equation is given by the family

y −2 + x2 = +c2 ,

where c2 = −2c1 is the constant of integration.


Give an interval of validity for your solution subject to the initial condition

(8.1) y(0) = 0, ()
q q
1 1
The solution becomes y 2 = ± c2 −x 2 and when x = 0, y = 0, so 0 = ± c2 −0
, meaning
1
c2
= 0. there is no such constant. Therefore, the interval of validity is the empty set φ

(8.2) y(0) = 1. ()
q
1
Now, when x = 0, y = 1, so 12 = ± c2 −0 2 , yielding c2 = 1. The solution becomes
q
1
y 2 = ± 1−x 2
2 . This solution is valid for 1 − x 6= 0 giving x 6= 1 or x 6= −1. Therefore,

the interval of validity is R − {−1, 1} = (−∞, −1) ∪ (−1, 1) ∪ (1, +∞).

Question 9: Marks

Solve the following differential equations:

dy
(9.1) x + 2y = x−3 . ()
dx
This equation is linear in y(x). Dividing by x yields the standard form

dy 2
+ y = x−4 , x 6= 0.
dx x

25
The integrating factor is
2 2
R
µ(x) = e x
dx
= e2 ln |x| = eln |x| = |x|2 = x2 .
Multiplying the equation by the integrating factor µ(x) yields
d(x2 y)
= x−2
dx
Integrating both sides with respect to x yields
1
x2 y = − + c, x 6= 0,
x
where c is the constant of integration. Finally, we solve for y to obtain
c 1
y = 2 − 3.
x x

(9.2) (1/y)dx − (3y + x/y 2 )dy = 0. ()


Identifying M (x, y) = 1/y and N (x, y) = −3y − x/y 2 we find
∂M ∂N ∂M
= −1/y 2 , = −1/y 2 =
∂y ∂x ∂y
This is an exact differential equation and from Theorem 2.4.1 (in the prescribed book),
there is a function f (x, y) such that
∂f ∂f
(1) = 1/y, = −3y − x/y 2 .
∂x ∂y
Hence, from the first of these equations, we have
Z
f (x; y) = (1/y)dx + g(y) = x/y + g(y)

where we treat y as constant and g(y) is the ”constant” of integration. It follows that
∂f
−x/y 2 + g 0 (y) = = −3y − x/y 2
∂y
so that g 0 (y) = −3y yielding g(y) = −(3/2)y 2 . The implicit solution is f (x, y) = c, i.e.
x 3 2
− y = c,
y 2
where c is the constant of integration.

Alternative: We can find the function f (x, y) from the seconde equation of (??) as
follows: Z
f (x; y) = (−3y − x/y 2 )dy + h(x) = −(3/2)y 2 + x/y + h(x)
where we treat x as constant and h(x) is the ”constant” of integration. It follows that
∂f
1/y + h0 (x) = = 1/y
∂x
so that h0 (x) = 0 yielding h(x) = c1 = constant. The implicit solution is f (x, y) = c,
i.e.
x 3 2
−(3/2)y 2 + x/y + c1 = c equivalent to − y =k
y 2
where k = c − c1 is the constant of integration.

26
APM2611/101/3/2018

dy x2 − y 2
(9.3) = . ()
dx 3xy
The equation is equivalent to (x2 − y 2 )dx − 3xydy = 0 This equation is homogeneous of
degree 2 since

M (tx, ty) = (tx)2 − (ty)2 = t2 (x2 − y 2 ) = t2 M (x, y)

and
N (tx, ty) = −3(tx)(ty) = t2 (−3xy) = t2 N (x, y).
Thus, we use the substitution y = ux so that dy = xdu + udx. The equation becomes

(x2 − u2 x2 )dx − 3ux2 (xdu + udx) = 0

x2 (1 − 4u2 )dx − 3ux3 du = 0


This equation is separable and separating variables
1 3u
dx = du, 1 − 4u2 6= 0, x 6= 0.
x 1 − 4u2
Integrating both sides yields

ln |x| = −(3/8) ln |1 − 4u2 | + c, 1 − 4u2 6= 0, x 6= 0,

where c is the constant of integration. Multiplying by 8, using properties of the logarithm


function and exponentiating gives the equation

|x|8 = e8c |1 − 4u2 |−3

Substituiting u = y/x gives


e8c
|x|8 =
|1 − 4( xy )2 |3
which is the implicit solution. This needs the restriction 1 − 4( xy )2 6= 0 equivalent to
4y 2 6= x2
Next, we show that y 2 = x2 /4 is a singular solution for the equation

dy x2 − y 2
= .
dx 3xy
d 2 d 2 dy
Implicit differentiation provides dx
y = dx
x /4, in other words 2y dx = x/2. It follows
that, when y 2 = x2 /4,
dy x
= .
dx 4y
On the other hand, when y 2 = x2 /4,

x2 − y 2 x2 − x2 /4 x dy
= = = .
3xy 3xy 4y dx

27
dy y
(9.4) + = 5(x − 2)y 1/2 . ()
dx x − 2
Notice that y = 0 satisfies the equation. Now assume y 6== 0. This equation is a
Bernoulli equation with n = 1/2. To make the equation linear, we set u = y 1−1/2 = y 1/2
so that
du 1 dy dy du
= y −1/2 =⇒ = 2y 1/2 .
dx 2 dx dx dx
Hence,
du y
2y 1/2 + = 5(x − 2)y 1/2
dx x − 2
which simplifies to
du y 1/2 5
+ = (x − 2)
dx 2(x − 2) 2
du 1 5
+ u = (x − 2)
dx 2(x − 2) 2
Thus we have a linear equation with integrating factor
1
R
dx
µ(x) = e 2(x−2) = e(1/2) ln |x−2| = |x − 2|1/2

and multiplying by the integrating factor yields


d 5
(u(x − 2)1/2 ) = (x − 2)(x − 2)1/2
dx 2
d 5
(u(x − 2)1/2 ) = (x − 2)3/2
dx 2
Integrating both sides of the equation leads to
5 1 3
u(x − 2)1/2 = 3 (x − 2) 2 +1 + c,
2 2 +1

giving
u = (x − 2)2 + c(x − 2)−1/2 .
Then,
y 1/2 = u = (x − 2)2 + c(x − 2)−1/2
so that 2
y = (x − 2)2 + c(x − 2)−1/2 ,


with c is the constant of integration.

28
APM2611/101/3/2018

Question 10: Marks

The air in a room, of size 12m by 8m by 8m, is 3% carbon monoxide. Starting at time t = 0, fresh
air containing no carbon monoxide is blown into the room at a rate of 100m3 /min. If air in the room
flows out through a vent at the same rate, when will the air in the room be 0.01% carbon monoxide?
In this exercise, it is easy to think in terms of the volume of the CO (= carbon monoxide)as part
of the gas in the room. There are many ways of solving the problem, but note that we are told
nothing related to gas density or mass. Let v(t) be the volume of CO in the room (measured in
3
m3 ) at the time t (measured in minutes). Then v(0) = 100 × 768 = 23.04m3 because the room has
3
volume 8 × 8 × 12 = 768m and is 3% CO. From the basic principle of mathematical modeling, we
say dv
dt
= (input) - (output) giving
dv v(t)
= 0 − 100 ×
dt 768
where the ”input=0” is due to the fact that no CO enters the room while the ”output” is given by
the fact that the volume of CO leaving the room is 100m3 /min times the fraction of the gas which is
CO (given by v(t)
768
). (We assume the gases are well-mixed!) hence,

dv 100
=− v(t)
dt 768
which has solution
100 100
v(t) = v(0)e− 768 t = 23.04e− 768 t .
We want to find the time when
0.01 100
× 768 = 23.04 × e− 768 t
100
Dividing by 23.04 and using the properties of the logarithm function yield
 
768 0.0001 × 768
t=− × ln ' 43.8
100 23.04

This time is about t = 43.8 minutes.


Alternative: let r be the percentage of room air changed in one minute then
100
r= × 100 ' 13.02% = 0.1302
768
let p be the percentage volume of CO in the room at any time t.

dp(t)
= −rp(t)
dt
with the solution
p = p(0)e−rt = 3e−rt
We want to find the time when p = 0.01 giving 0.01 = p(0)e−rt = 3e−rt . Hence,

ln 300 ln 300
t= = = 43.8 minutes
r 0.1302

29
Question 11: Marks

(11.1) Find a general solution for the following differential equation: ()

y (4) − 6y 000 + 17y 00 − 28y 0 + 20y = 0

given that
x4 − 6x3 + 17x2 − 28x + 20 = (x − 2)2 (x2 − 2x + 5).
This is a homogeneous linear equation with constant coefficients. As shown in Chapter
4, the equation requires the calculation of the roots of a quartic polynomial given as

m4 − 6m3 + 17m2 − 28m + 20 = 0

Since
m4 − 6m3 + 17m2 − 28m + 20 = (m − 2)2 (m2 − 2m + 5)
then the roots of
m4 − 6m3 + 17m2 − 28m + 20 = 0
are √ √
m1 = m2 = 2, m3 = 1 + −4 = 1 + 2i, m4 = 1 − −4 = 1 − 2i.
Thus we find the general solution

y(x) = c1 e2x + c2 xe2x + c3 ex cos 2x + c4 ex sin 2x.

(11.2) Find a general solution for the differential equation ()

y 00 − 5y 0 + 6y = e3x − x2
We first find the complimentary solution. The auxiliary equation is

m2 − 5m + 6 = 0

which has the following two roots

m1 = 2, m2 = 3

Thus the complementary solution is

yc = c1 e2x + c2 e3x

(a) using the method of undetermined coefficients. ()


The right hand side of the equation has the form

Ae3x + Bxe3x + C + Dx + Ex2

However, note that Ae3x is already included in the expression of yc , (which is c2 e3x ).
So it is ignored and then, the particular solution takes the form

yp = Bxe3x + C + Dx + Ex2 .

30
APM2611/101/3/2018

The derivatives are

yp0 = D + 2xE + Be3x + 3xBe3x

yp00 = 2E + 6Be3x + 9xBe3x


Inserting the derivatives into the equation yields

1: 2E − 5D + 6C = 0

x: 10E + 6D = 0
x2 : 6E = −1
e3x : 6B − 5B = 1
xe3x : 9B − 15B + 6B = 0
It follows that B = 1, C = −19/108, D = −5/18 and E = −1/6. Thus the
particular solution is
19 5 1
yp = xe3x − − x − x2
108 18 6
and the general solution is
19 5 1
y(x) = yc + yp = c1 e2x + c2 e3x + xe3x − − x − x2
108 18 6
(b) using variation of parameters. ()
We assume from the form of the complimentary solution that yp = u1 (x)y1 (x) +
u2 (x)y2 (x) where y1 (x) = e2x and y2 (x) = e3x . The equation y 00 − 5y 0 + 6y = e3x − x2
is already written in standard form (i.e. the leading coefficient should be 1.) The
Wronskian is given by

e2x e3x
(2) W (e2x , e3x ) = = e5x
2e2x 3e3x

and
0 e3x
(3) W1 = = x2 e3x − e6x
e3x − x2 3e3x

e2x 0
(4) W2 = 2x = e5x − x2 e2x
2e e − x2
3x

We find
W1 x2 e3x − e6x
u01 = = = x2 e−2x − ex
W e5x
W2 e5x − x2 e2x
u02 = = = 1 − x2 e−3x
W e5x

31
Integrating by parts yields
 
1 2 1 −2x
u1 = − x +x+ e − ex
2 2
 
1 2 2 2 −3x
u2 = x + x + x+ e
3 3 9
so that
yp = u1 (x)y1 (x) + u2 (x)y2 (x)
       
1 2 1 −2x x 2x 1 2 2 2 −3x 3x
yp = − x +x+ e −e e + x+ x + x+ e e
2 2 3 3 9
19 5 1
yp = xe3x − − x − x2
108 18 6
The general solution is
19 5 1
y(x) = yc + yp = c1 e2x + c2 e3x + xe3x − − x − x2
108 18 6
(c) using the D-operator method. ()
The equation can be rewritten in terms of the D-operator

(D2 − 5D + 6)y = e3x − x2

equivalent to
1
(5) y= (e3x − x2 )
D2 − 5D + 6
Factorising
D2 − 5D + 6 = (D − 2)(D − 3)
We solve for α and β in the equation
1 α β
= + .
D2 − 5D + 6 D−2 D−3
This gives 1 = α(D − 3) + β(D − 2) Substituting D = 3, we get β = 1 and for
D = 2, we get α = −1. Hence
1 1 1
= − + .
D2 − 5D + 6 D−2 D−3
We put this back in equation (??) to get
1 1
y=− (e3x − x2 ) + (e3x − x2 )
D−2 D−3
Now we solve
1
y=− (e3x − x2 )
D−2

32
APM2611/101/3/2018

(D − 2)y = −e3x + x2 equivalent to y 0 − 2y = −e3x + x2 This is just a simple


first-order
R linear DE, which we solve in the usual way: the integrating factor is
−2dx −2x
e =e and so
d −2x
[e y] = e−2x (−e3x + x2 ) = x2 e−2x − ex
dx
Integrating by parts the right hand side yields
 
1 2 1
y=− x +x+ − e3x
2 2
1
Similarly a solution of y = D−3
(e3x − x2 ) yields

y 0 − 3y = e3x − x2
d −3x
[e y] = e−3x (−e3x + x2 ) = 1 − x2 e−3x
dx
 
3x 1 2 2 2
y = xe + x + x+
3 3 9
Then, adding them gives
   
1 2 1 3x 3x 1 2 2 2
yp = − x +x+ − e + xe + x + x+
2 2 3 3 9
The general solution is
19 5 1
y(x) = yc + yp = c1 e2x + c2 e3x + xe3x − − x − x2
108 18 6

Question 12: Marks

Solve the initial value problem

y 00 − 2y 0 = 8x, y(0) = 1, y 0 (0) = 2

using the method of variation of parameters.


For the complimentary solution, the auxiliary equation is

m2 − 2m = 0

with the solutions m = 0 and m = 2 and yielding the the complementary solution

yc = c1 + c2 e2x

Hence, from the form of the complimentary solution we take yp = u1 (x)y1 (x) + u2 (x)y2 (x) where
y1 (x) = 1 and y2 (x) = e2x . The equation y 00 − 2y 0 = 8x is already written in standard form (i.e. the
leading coefficient should be 1.) The Wronskian is given by

1 e2x
(6) W (1, e2x ) = = 2e2x
0 2e2x

33
and
0 e2x
(7) W1 = = −8xe2x
8x 2e2x

1 0
(8) W2 = = 8x
0 8x

We find
W1 −8xe2x
u01 = = = −4x
W 2e2x
W2 8x
u02 = = 2x = 4xe−2x
W 2e
Integrating by parts yields
u1 = −2x2
u2 = − (2x + 1) e−2x
so that
yp = u1 (x)y1 (x) + u2 (x)y2 (x) = −2x2 − (2x + 1) e−2x e2x = −2x2 − 2x − 1
The general solution is
y(x) = yc + yp = c1 + c2 e2x − 2x2 − 2x − 1
The initial value y(0) = 1 yields 1 = c1 + c2 − 1. The initial condition y 0 (0) = 2 yields

2 = 2c2 e2·0 − 4 · 0 − 2 = 2c2 − 2

Thus c2 = 2 and c1 = 0. The solution is

y = 2e2x − 2x2 − 2x − 1.

Alternative:
The general solution is equivalent to

y(x) = c + c2 e2x − 2x2 − 2x where c = c1 − 1

The initial value y(0) = 1 yields 1 = c + c2 . The initial condition y 0 (0) = 2 yields

2 = 2c2 e2·0 − 4 · 0 − 2 = 2c2 − 2

Thus c2 = 2 and c = 1 − c2 = −1. The solution is

y = −1 + 2e2x − 2x2 − 2x.

34
APM2611/101/3/2018

D.6.2 Assignment 2 type

Question 13: Marks


Use the power series method to solve the initial value problem:
y 00 + 2xy 0 + x2 y = 2, y(0) = 0, y 0 (0) = 1.
P∞
Let y = j=0 aj xj . The initial value problem becomes

X ∞
X ∞
X
j(j − 1)aj xj−2 + 2x jaj xj−1 + x2 aj xj = 2, a0 = 0, a1 = 1.
j=2 j=1 j=0

Thus we have

X ∞
X ∞
X
j−2 j
j(j − 1)aj x +2 jaj x + aj xj+2 = 2, a0 = 0, a1 = 1.
j=2 j=1 j=0

To convert the first sum to easily comparable powers, we substitute j − 2 → j so that j → j + 2 and
j(j − 1) → (j + 2)(j + 1) (the lower bound on the sum becomes j + 2 = 2 so that j = 0):
X∞ ∞
X X∞
j j
(j + 2)(j + 1)aj+2 x + 2 jaj x + aj xj+2 = 2, a0 = 0, a1 = 1.
j=0 j=1 j=0

Separating terms in the sums which are not common yields



X
2
2a2 + a0 x + ((j + 2)(j + 1)aj+2 + 2jaj ) xj + aj xj+2 = 2.
| {z }
j=0 j=1

The different terms for each j to be summed are


j=0 2a2 + a0 x2
j=1 (6a3 + 2a1 )x + a1 x3
j=2 (12a4 + 4a2 )x2 + a2 x4
..
.
j=n ((n + 2)(n + 1)an+2 )xn + an xn+2
..
.
Comparing coefficients of x and it powers we find
a0 = 0
a1 = 1
a2 = 1
x: 6a3 + 2a1 = 0 a3 = −1/3
x2 : a0 + 12a4 + 4a2 = 0 a4 = −1/3
..
.
−2jaj − aj−2
aj−2 + (j + 2)(j + 1)aj+2 + 2jaj = 0 aj+2 = , j≥2
(j + 2)(j + 1)
..
.

35
−4a2 −a0
Thus we find a4 = 12
= −1/3, Similarly a5 = 1/20, . . . a6 = −1/18. It follows that

X x3 x4 x5
y(x) = aj x j = x + x 2 − − + + ··· .
j=0
3 3 20

Question 14: Marks

Consider the function (


e2t 0≤t<3
f (t) = .
1 3≤t

(14.1) Find the Laplace transform of f (t) by first principles. ()


We find
Z 3 Z ∞
−st 2t
L {f (t)} = e e dt + e−st dt
Z0 3 Z 3∞
= e(2−s)t dt + e−st dt
0 3
1  (2−s)t 3 1  −st ∞
= e 0
− e 3
2−s s
1  1
= e3(2−s) − 1 + e−3s
2−s s

(14.2) Express f (t) in terms of the Heaviside step function and use the table of Laplace trans- ()
forms to calculate L {f (t)}.
Since
f (t) = (U (t − 0) − U (t − 3))e2t + (U (t − 3) − U (t − ∞))
we have

L {f (t)} = L U (t − 0)e2t − L U (t − 3)e2t + L {U (t − 3)}


 

= L e2t − L U (t − 3)e2(t−3+3) + L {U (t − 3)}


 

= L e2t − L U (t − 3)e2(t−3) e6 + L {U (t − 3)}


 

1 e−3s
− e L U (t − 3)e
6 2(t−3)

= +
s−2 s
−3s
1 1 e
= − e6 e−3s +
s−2 s−2 s
1 1
e3(2−s) − 1 + e−3s

=
2−s s

36
APM2611/101/3/2018

Question 15: Marks

Solve the following initial value problem using Laplace transforms


y 00 − 5y 0 + 6y = 26 cos 2t + 6, y(0) = 1/2, y 0 (0) = 0.

L {y 00 − 5y 0 + 6y} = L {26 cos 2t + 6}


L {y 00 } − 5L {y 0 } + 6L {y} = 26L {cos 2t} + 6L {1}
s 6
s2 L {y} − sy(0) − y 0 (0) − 5(sL {y} − y(0)) + 6L {y} = 26 2 +
s +4 s
s 1 26s 6
s2 L {y} − − 5(sL {y} − ) + 6L {y} = 2 +
2 2 s +4 s
5 − s 26s 6
(s2 − 5s + 6)L {y} + = 2 +
2 s +4 s
so that
s4 − 5s3 + 68s2 − 20s + 48
L {y} =
2s(s2 + 4)(s − 2)(s − 3)
Partial fraction decomposition
s4 − 5s3 + 68s2 − 20s + 48 A Bs + C D E
2
= + 2 + +
2s(s + 4)(s − 2)(s − 3) s s +4 s−2 s−3
yields
48A − 24sD − 16sE + 20As2 − 10As3 + 2As4 + 12Bs2 − 10Bs3 + 2Bs4 − 10Cs2 + 2Cs3
+ 8s2 D + 8s2 E − 6s3 D − 4s3 E + 2s4 D + 2s4 E − 40As + 12Cs = s4 − 5s3 + 68s2 − 20s + 48

(2A + 2B + 2D + 2E)s4 + (−10A − 10B + 2C − 6D − 4E)s3 + (20A + 12B − 10C + 8D + 8E)s2


+ (−40A + 12C − 24D − 16E)s + 48A = s4 − 5s3 + 68s2 − 20s + 48
and comparing coefficients of powers of s yields
s4 : 2A + 2B + 2D + 2E = 1 1
s3 : − 10A − 10B + 2C − 6D − 4E = −5 2

s2 : 20A + 12B − 10C + 8D + 8E = 68 3


s: − 40A + 12C − 24D − 16E = −20 4
1: 48A = 48 5
There are number of methods to solve this system of linear equations. We solve it using the substitution
method. Equation 5 yields A = 1. The substitution into equations 1 to 4 gives
1p
s4 : 2B + 2D + 2E = −1
2p
s3 : − 10B + 2C − 6D − 4E = 5
3p
s2 : 12B − 10C + 8D + 8E = 48
4p
s : 12C − 24D − 16E = 20

37
1p −1−2D−2E 1pp
Equation yields B = 2
4p 20+24D+16E 4pp
Equation yields C = 12
1pp 4pp 2p 3p
Substituting equations and into equations and yields

   
−1 − 2D − 2E 20 + 24D + 16E
− 10 +2 − 6D − 4E = 5
2 12
   
−1 − 2D − 2E 20 + 24D + 16E
12 − 10 + 8D + 8E = 48
2 12

Reducing this system of equations gives


26 10 6
8D + E=−
3 3
52 212
− 24D − E = 7 .
3 3

Equation 6 yields
− 10
3
− 26
3
E
D= 8 .
8
Substituting equation 8 into 7 yields

− 10
3
− 26
3
E 52 212
−24( )− E= ,
8 3 3
which gives
212 3
E=( − 10) = 7.
3 26
1pp 4pp
Hence, substituting E into equations 8 , and respectively gives D = −8 B = 1/2, C = −5.
Finally

A = 1, B = 1/2, C = −5, D = −8, E = 7.

s

 
1 −1 5 −8 7
y=L + 2 + +
s s2 + 4 s − 2 s − 3
         
−1 1 1 −1 s −1 1 −1 1 −1 1
=L + L − 5L − 8L + 7L
s 2 s2 + 4 s2 + 4 s−2 s−3
1 5
= 1 + cos 2t − sin 2t − 8e2t + 7e3t
2 2

38
APM2611/101/3/2018

Question 16: Marks

Compute the Fourier series for the function


(
x 0≤x<π
f (x) =
−x otherwise

on (−π, π).
Integrating by parts the coefficients are given by

1 π
Z Z 0 Z π 
1
a0 = f (x)dx = (−x)dx + xdx = π
π −π π −π 0
1 π
Z
an = f (x) cos nx dx
π −π
Z 0 Z π 
1
= (−x) cos nx + x cos nx dx
π −π 0
Z 0 Z π
1
= (2π sin πn + sin nx dx − sin nx dx)
nπ −π 0
1 1 1 1 1
= (2π sin πn + cos πn − − + cos πn)
nπ n n n n
1
= (2 cos πn + 2πn sin πn − 2)
πn2
2
= ((−1)n − 1)
πnZ2
1 π
bn = f (x) sin nx dx
π −π
Z 0 Z π 
1
= (−x) sin nx + x sin nx dx
π −π 0
−1 0 1 π
Z Z
= x sin nx + x sin nx dx
π −π π 0
Z 0 Z π
1 1 π 1 π
= (− cos nx dx + cos πn + cos nx dx − cos πn)
π −π n n 0 n n
1 11 π 11 π
= (− sin πn + cos πn + sin πn − cos πn)
π nn n nn n
=0

Thus ∞
π X
f (x) = + (((−1)n − 1) cos nx)
2 n=1
on (−π, π).
The following figure shows the truncated series (for n ≤ 200).

39
The figure was generated using GNUplot (http://gnuplot.info):
set samples 1000
set xrange [-pi:pi]

a(n) = 2.0/(n**2)*((-1)**n-1)/pi

f(x,n) = (n == 0) ? (pi)/2 : a(n)*cos(n*x) + f(x,n-1)


plot f(x,200)

Question 17: Marks

Use separation of variables to find a solution of the partial differential equation


∂u ∂u
+ y2 = 0,
∂x ∂y
on x, y ∈ (0, ∞), with boundary value u(x, 1) = ex .
Assume u(x, y) = X(x)Y (y). Then
∂u ∂u dX dY
+ y2 = Y + y2X = 0.
∂x ∂y dx dy
The equation separates:    
dX 2 dY
Y =− y X
dx dy
and since we seek a non-zero solution (X 6= 0, Y 6= 0)
1 dX y 2 dY
=− .
X dx Y dy
Since the two sides are independent of each other, there must exist a constant k such that
1 dX y 2 dY
=k − = k.
X dx Y dy

40
APM2611/101/3/2018

Integrating these equations yields


k
ln |X| = kx + c1 ln |Y | = + c2 ,
y
where c1 and c2 are constants of integration. It follows that
k
|X| = ekx ec1 , |Y | = e y ec2

so that
k k
|u(x, y)| = u(x, y) = ec1 +c2 ekx e y = ec1 +c2 ekx+ y
on x, y ∈ (0, ∞), with boundary value u(x, 1) = ex . Thus we find
k
u(x, y) = Cekx+ y

where C = ec1 +c2 . Since u(x, 1) = ex we have

ex = u(x, 1) = Cekx+k = Cek ekx

so that k = 1 and C = e−1 . Thus


1 1
u(x, y) = e−1 ex+ y = ex+ y −1

41

You might also like