Tutorial Letter 101-APM2611-2024

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

APM2611/101/0/2024

Tutorial letter 101/0/2024

DIFFERENTIAL EQUATIONS
APM2611

Year module

Department of Mathematical Sciences

IMPORTANT INFORMATION:
This tutorial letter contains important information about your
module. Please activate your myUnisa and myLife e-mail
account and make sure that you have regular access to the
myUnisa module website APM2611-24-Y, as well as your group
website.
Note: This is a fully online module. It is therefore, only available
on myUnisa.

BARCODE

university
Define tomorrow. of south africa
CONTENTS

Page

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

2
APM2611/101/0/2024

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


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

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.

This tutorial letter contains important information about the scheme of work, resources and assign-
ments for this module as well as exam admission. We urge you to read it carefully before working
through the study material, preparing the assignment(s), preparing for the examination and addressing
questions to your lecturers. In this tutorial letter, you will find the assignments as well as instructions
on the preparation and submission of the assignments. This tutorial letter also provides all the infor-
mation you need with regard to the prescribed study material and other resources. Please study this
information carefully and make sure that you obtain the prescribed material as soon as possible. You
will access all files online, a number of tutorial letters for example, solutions to assignments, during
the year. These tutorial letters will be uploaded on myUnisa, under Additional Resources and Lessons
tools on myUnisa platform. A tutorial letter is our way of communicating with you about teaching,
learning and assessment. Right from the start we would like to point out that you must read all the
tutorial letters you access from the module site immediately and carefully, as they always contain
important and, sometimes urgent information.

Because this is a fully online module, you will need to use myUnisa to study and complete the learning
activities for this course. Please visit the website for APM2611 on myUnisa frequently. The website
for your module is APM2611-24-Y.
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 material,
“chat” to your lecturers and fellow students about your studies and the challenges you encounter, 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.

4
APM2611/101/0/2024

1.3 CURRICULUM TRANSFORMATION


Unisa has implemented a transformation charter based on five pillars and eight dimensions. In response
to this charter, we have placed curriculum transformation high on the teaching and learning agenda.
Curriculum transformation includes the following pillars: student-centred scholarship, the pedagogical
renewal of teaching and assessment practices, the scholarship of teaching and learning, and the infusion
of African epistemologies and philosophies. These pillars and their principles will be integrated at
both programme and module levels as a phased-in approach. You will notice a marked change in the
teaching and learning strategy implemented by Unisa, together with how the content is conceptualised
in your modules. We encourage you to embrace these changes during your studies at Unisa in a
responsive way within the framework of transformation.

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
recognize 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 behavior of certain
physical processes.

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).

5
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 2024, the prime lecturer is:
Prof. Emile Franc Doungmo Goufo .
[email protected], 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 telephone.
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.

3.2 E-tutor(s)
There are e-tutor service and help available for this module. You can contact your e-tutor using
myUnisa (on the provided link) for any assistance related to the module. You can also participate to
online discussions/forums with peers (moderated by your e-tutor and lecturer).

3.3 Department
The contact details for the Department of Mathematical Sciences are:

Departmental Secretary: (011) 670 9147 (SA); +27 11 670 9147 (International)
E-mails Secretary: [email protected] or [email protected]

3.4 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 is available for you (The Study@Unisa website is avail-
able on myUnisa: www.unisa.ac.za/brochures/studies). 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.

6
APM2611/101/0/2024

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 [email protected].

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
Note Any other recent edition (other than 8th) is acceptable.
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


Title: Differential Equations and Boundary Value Problems: Computing and Modeling
Authors: Edwards, C. Henry
Edition: 5th edition, 2016
Publishers: Pearson
ISBN: 9781292108773
Another book, titled “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

For more detailed information, go to the Unisa website: http://www.unisa.ac.za/, click on Library.
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

7
• 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 is available for
you (The Study@Unisa website is available on myUnisa: www.unisa.ac.za/brochures/studies).

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

Year
Outcome 2.2.1 – 2.2.3 to be achieved by 1 April 2024
Outcome 2.2.4 – 2.2.6 to be achieved by 1 August 2024
Work through previous exam papers by 15 September 2024
Revision Immediately after

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.

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:

8
APM2611/101/0/2024

Year mark Final mark


Assignment 01: 25% −→ Year mark: 20%
Assignment 02: 25%
Assignment 03: 25%
Assignment 04: 25% 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, Assignment 03, Assignment 04,
etc.

8.3.2 Unique assignment numbers


Please note that if the unique assignment number is given for each assignment, then it 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 only submit your assignments electronically via myUnisa. Assignments may not be submitted
by fax nor e–mail nor by post

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 myUnisa.

• 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.

9
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 (solu-
tions to Assignment 02) etc., a few days after the closing date. They will also be made available on
myUnisa. 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 (in certain cases), examination dates and examination
times.
The final examination is a 2-hours written exam that will be conducted online, according
to the examination calendar, which you can access on the Unisa website.
For general information and requirements as far as examinations are concerned, see the brochure
Study @ Unisa
Registered for . . . Examination period Supplementary examination period
1st semester module May/June 2024 October/November 2024
2nd semester module October/November 2024 May/June 2025
Year module (like this APM2611) October/November 2024 January/February 2025

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/0/2024

ADDENDUM A: ASSIGNMENTS

ASSIGNMENT 01
Due date: Wednesday, 8 May 2024
-

ONLY FOR YEAR MODULE

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 own and personalized workings, you get ZERO
to a question if we see that you have copied someone’s else solution word by word.

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

Note that all the questions will be marked therefore, it is highly recommended to attempt all of them.

Question 1

Prove that the given function is a solution of the given differential equation.
1.
y 00 − 2y 0 + 5y = 0 ; y = ex (cos 2x − sin 2x)

2.
dy π
− ecos x = −y cot x , y( ) = 4;
dx 2
y = − csc x(ecos x − 5)

3. (i) Verify that y = θ1 (x) = x2 and y = θ2 (x) = −x2 are solutions of the differential equation
xy 0 − 2y = 0 on the interval (−∞, ∞).
(ii) Verify that the piecewise-direction function

−x2 , x<0
y=
x2 , x≥0
is a solution of xy 0 − 2y = 0 on the interval (−∞, ∞).

Question 2

Consider the DE
(6xy − y 3 )dx + (4y + 3x2 − 3xy 2 )dy = 0.
1. Prove that it is exact.
2. Solve it.

11
Question 3
Solve the following DEs:
1.
dy
x2 + 2xy = 5y 3
dx
2.
x2 y 0 = y 2 + 2y + 1, y(1) = 13

Question 4

1. Solve the given differential equations by separation of variables:


(i)
dy
ex y = e−y + e−2x−y
dx
(ii)
 2
dx y+1
y ln |x| =
dy x
2. Solve the initial value problem:
dy y2 − 1
= 2 , y(2) = 2
dx x −1
3. Solve the following DEs using the appropriate substitutions.
(a)
dy y
x = y + xe x , y(1) = 1
dx
(b)
xy − y 2
y0 = Hint: make substitution y = ux
x2 − y 2
Leave your answer in an implicit form.
(c)
x2 y 00 + 2xy 0 + y = 0

Question 5

1. A large tank is filled with 500 litres of pure water. Brine containing 2kg of salt per litre is
pumped into the tank at a rate of 5 litres/min. The well-mixed solution is pumped out at the
same rate. Find the number A(t) of kg of salt in the tank at time t. What is the concentration
of the solution in the tank at t = 5min?
2. Solve part (1.) under the assumption that the solution is pumped out at a faster rate of 10
litres/min. When is the tank empty?

– End of assignment –
12
APM2611/101/0/2024

ASSIGNMENT 02
Due date: Wednesday, 19 June 2024
-

ONLY FOR YEAR MODULE

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

Answer all the questions. Show all your own and personalized workings, you get ZERO
to a question if we see that you have copied someone’s else solution word by word.

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

Note that all the questions will be marked therefore, it is highly recommended to attempt all of them.

Question 1

Solve the following DEs.

1.

y 000 − y = 0

2.
y 00 − 8y 0 + 15y = 0, y(0) = 1, y 0 (0) = 5

Question 2

Consider the DE

y 00 − y 0 − 2y = 10 cos x.

Using the method of undetermined coefficients,

1. find a solution for the homogeneous part of the DE

2. find a particular solution

3. write down the general solution for the DE.

13
Question 3

Consider the DE

y 00 + y = sec2 x.

Using the method of variation of parameters,

1. find a solution for the homogeneous part of the DE,

2. find a particular solution,

3. write down the general solution for the DE.

4. Find the general solution of the given differential equation:

(i)
y 000 − 6y 00 + 12y 0 − 8y = 0
(ii)
y 000 + 3y 00 + 3y 0 + y = 0

5. Solve the boundary value problem y 00 + y = 0, y 0 (0) = 0, y 0 ( π2 ) = 2.

Question 4

1. Solve the given differential equations by separation of variables:


dy
(i) ex y = e−y + e−2x−y
dx
dx 2
(ii) y ln |x| = y+1
x
dy
dy y2 − 1
2. Solve the initial value problem: = 2 , y(2) = 2
dx x −1
3. Show that the given differential equations are exact and solve them.
dy
(i) x = 2xex − y + 6x2 .
dx
(ii) (2xy 2 − 3)dx + (2x2 y + 4)dy = 0.

4. Solve the following linear DEs:

(i) y 0 + 2xy = (2x + 1)ex .


(ii) y 0 = 2y + x + 1.

14
APM2611/101/0/2024

Question 5

The radioactivity of a substance decays exponentially via the DE


dR
= kR,
dt
where k is a constant that determines the rate of decay. The radioactive isotope potassium-40 decays to
argon-40 with a half life of 1300 million years. R represents the amount of potassium-40 in a sample
of rock.

1. Calculate k.

2. A sample of rock has been found where 70% of the potassium-40 has decayed to argon-40. What
is the age of the rock?

This radioactive dating technique has been used to prove that the earth is about 4.54 billion years old!

– End of assignment –

15
ASSIGNMENT 03
Due date: Wednesday, 14 August 2024
-

ONLY FOR YEAR MODULE

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 own and personalized workings, you get ZERO
to a question if we see that you have copied someone’s else solution word by word.

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

Note that all the questions will be marked therefore, it is highly recommended to attempt all of them.

Question 1

1. Find the radius and interval of convergence of the following series:


(i)

X 100n
(x + 7)n
n=1
n!

(ii)

X (−1)k
(x − 5)k
k=1
10k

2. Rewrite the expression below as a single power series:



X ∞
X ∞
X
n n−2
n(n − 1)cn x + 2 n(n − 1)cn x + ncn xn .
n=2 n=2 n=1

Question 2

1. Verify by direct substitution that the given power series is a particular solution of the DE

X (−1)n+1
(x + 1)y 00 + y 0 = 0 ; y = xn .
n=1
n

2. Use the power series method to solve the initial value problem
(x + 1)y 00 − (2 − x)y 0 + y = 0, y(0) = 2, y 0 (0) = −1;
where c0 and c1 are given by the initial conditions.

16
APM2611/101/0/2024

Question 3

Calculate the Laplace transform of the following function from first principles:
1.

sin t if 0 ≤ t < π
f (t) =
0 if t ≥ π

2. f (t) = e−t sin t

3. Use Theorem 7.1 to find L{f (t)}

(i) f (t) = −4t2 + 16t + 9


(ii) f (t) = 4t2 − 5 sin 3t
(iii) f (t) = (et − e−t )2

Question 4

1. Use Theorem 7.3 to find the inverse transform:

(i)  
−1 2s − 4
L
(s + s)(s2 + 4)
2

(ii)  
−1 s
L
(s + 2)(s2 + 4)
2. Use the Laplace transform to solve the initial value problem

y 00 + 5y 0 + 4y = 0, y(0) = 1, y 0 (0) = 0.

Question 5

1. When g(t) = 1 and L{g(t)} = G(s) = 1s , the convolution theorem implies that the Laplace
transform of the integral of f is
Z t 
F (s)
L f (τ ) dτ = .
0 s
The inverse form is Z t  
−1 F (s)
f (τ ) dτ = L .
0 s
Find

17
nR o
t
(i) L 0
τ sin τ dτ
n R o
t
(ii) L t 0 τ e−τ dτ

Find the inverse


n o
−1 1
(iii) L s(s−1)
n o
−1 1
(iv) L s2 (s−1)

2. Find F (s)

(i) L{(3t + 1)U(t − 1)}


(ii) L{ (cos 2t)U(t − π)}

3. Use the Laplace transform to solve the given initial value problem:

y 00 + 4y 0 + 3y = 1 − U(t − 2) − U(t − 4) + U(t − 6),


y(0) = 0, y 0 (0) = 0.

4.

If F (s) = L{f (t)} and n = 1, 2, 3, ...., then

dn
L{tn f (t)} = (−1)n F (s).
dsn
Use this theorem to obtain

(i) L{te−3t cos 3t}


Rt
(ii) L{t 0 sin τ dτ }
Rt
(iii) L{t 0 τ e−τ dτ }

– End of assignment –

18
APM2611/101/0/2024

ASSIGNMENT 04
Due date: Wednesday, 25 September 2024
-

ONLY FOR YEAR MODULE

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

Answer all the questions. Show all your own and personalized workings, you get ZERO
to a question if we see that you have copied someone’s else solution word by word.

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

Note that all the questions will be marked therefore, it is highly recommended to attempt all of them.

Question 1

1. Find the radius and interval of convergence of the following series:



X (−1)n−1 x2n−1
n=1
(2n − 1)!

2. Rewrite the expression below as a single power series:



X ∞
X
n−2
cn+1 x − 4cn xn−1 .
n=2 n=1

3. Use the power series method to solve the initial value problem

(x + 1)y 00 − (2 − x)y 0 + y = 0, y(0) = 2, y 0 (0) = −1;

where c0 and c1 are given by the initial conditions.

4. Use the power series method toPsolve the initial value problem. In particular, find c0 , c1 , c2 , c3
and c4 in the equation y(x) = ∞ n
n=0 cn x .

y 00 − x2 y = 0; y(0) = 3, y 0 (0) = 7.

Question 2

Using the method of separation of variables, find a solution for the following PDEs:
1.
∂ 2u ∂u
2
=4 .
∂x ∂y

19
2.
∂u ∂u
= .
∂x ∂y
3. the initial value problem:

y 00 + 4y 0 + 3y = 1 − U(y − 2) − U(t − 4) + U(t − 6),


y(0) = 0, y 0 (0) = 0.

Question 3

Compute the following Fourier series:

1. Fourier series for f (x) = x2 on [−π, π].

2. Sine series for f (x) = x2 on [0, π].

3. Cosine series for f (x) = x2 on [0, π].

Question 4

Using the method of separation of variables, find a solution for the following PDEs:
∂ 2u ∂u
1. 2
= .
∂x ∂y
 
∂u ∂u
2. =4 .
∂x ∂y

Question 5

Find the temperature u(x, t) in a rod of length L if the initial temperature is f (x) throughout and if
the ends x = 0 and x = L are insulated.

– End of assignment –

20
APM2611/101/0/2024

ADDENDUM B: 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 C 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.

21
ADDENDUM C: 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.

C.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.

C.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)));

22
APM2611/101/0/2024

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

C.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:

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

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

C.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)

24
APM2611/101/0/2024

(%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).

C.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

25
%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.

26
APM2611/101/0/2024

C.6 Some assignment type questions with solutions


C.6.1 Assignment 1 type

Question 6

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

(6.1) y(0) = 0,
q q
The solution becomes y = ± c2 −x2 and when x = 0, y = 0, so 0 = ± c21−0 , meaning
21

1
c2
= 0. there is no such constant. Therefore, the interval of validity is the empty set φ

(6.2) y(0) = 1.
q
2 1
Now, when x = 0, y = 1, so 1 = ± 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 7

Solve the following differential equations:

(7.1)
dy
+ 2y = x−3 .
x
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

27
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= − .
x2 x3

(7.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 (1) as
follows: Z
f (x; y) = (−3y − x/y 2 )dy + h(x) = −(3/2)y 2 + x/y + h(x)

28
APM2611/101/0/2024

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.

(7.3)
dy x2 − y 2
= .
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

29
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

(7.4)
dy y
+ = 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.

30
APM2611/101/0/2024

Question 8

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

31
Question 9

(9.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.

(9.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 .

32
APM2611/101/0/2024

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

33
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 (5) to get
1 1
y=− (e3x − x2 ) + (e3x − x2 )
D−2 D−3
Now we solve
1
y=− (e3x − x2 )
D−2

34
APM2611/101/0/2024

(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 10

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

35
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.

36
APM2611/101/0/2024

C.6.2 Assignment 2 type

Question 11
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)
..
.

37
−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 12

Consider the function (


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

(12.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

(12.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

38
APM2611/101/0/2024

Question 13

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

39
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

40
APM2611/101/0/2024

Question 14

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).

41
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 15

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

42
APM2611/101/0/2024

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

43

You might also like