Numerical Solutions of Second-Order Differential Equations (Edexcel A Level Further Maths: Further Pure 1): Revision Note

Exam code: 9FM0

Mark Curtis

Written by: Mark Curtis

Updated on

Numerical solutions of second-order differential equations

What is the central difference method for second derivatives?

  • The central difference method for second derivatives is a numerical method using the iterative formula

    • open parentheses fraction numerator straight d squared y over denominator straight d x squared end fraction close parentheses subscript n almost equal to fraction numerator open parentheses y subscript n plus 1 end subscript minus 2 y subscript n plus y subscript n minus 1 end subscript close parentheses over denominator h squared end fraction

    • to approximate the particular solution of a second-order differential equation

      • fraction numerator straight d squared y over denominator straight d x squared end fraction equals straight f open parentheses x comma space y close parentheses

      • with initial conditions y equals y subscript 0 and fraction numerator straight d y over denominator straight d x end fraction equals open parentheses fraction numerator straight d y over denominator straight d x end fraction close parentheses subscript 0 at x equals x subscript 0

    • using step sizes of h

      • where decreasing h increases the accuracy

  • You need two starting points, y subscript 0 and y subscript 1, from which you can find y subscript 2

    • y subscript 0 is given in the question

    • y subscript 1 is found using the forward difference method open parentheses fraction numerator straight d y over denominator straight d x end fraction close parentheses subscript n almost equal to fraction numerator y subscript n plus 1 end subscript minus y subscript n over denominator h end fraction for first derivatives

      • i.e. rearranging open parentheses fraction numerator straight d y over denominator straight d x end fraction close parentheses subscript 0 almost equal to fraction numerator y subscript 1 minus y subscript 0 over denominator h end fraction to give y subscript 1

  • The formula comes from writing the second derivative as the rate of change of the first derivative

    • open parentheses fraction numerator straight d squared y over denominator straight d x squared end fraction close parentheses subscript n almost equal to fraction numerator open parentheses fraction numerator straight d y over denominator straight d x end fraction close parentheses subscript n minus open parentheses fraction numerator straight d y over denominator straight d x end fraction close parentheses subscript n minus 1 end subscript over denominator h end fraction

    • then substituting in the forward difference formula for first derivatives and simplifying

      • open parentheses fraction numerator straight d y over denominator straight d x end fraction close parentheses subscript n almost equal to fraction numerator y subscript n plus 1 end subscript minus y subscript n over denominator h end fraction and open parentheses fraction numerator straight d y over denominator straight d x end fraction close parentheses subscript n minus 1 end subscript almost equal to fraction numerator y subscript n minus y subscript n minus 1 end subscript over denominator h end fraction

Examiner Tips and Tricks

You will be given the formulas open parentheses fraction numerator straight d squared y over denominator straight d x squared end fraction close parentheses subscript n almost equal to fraction numerator open parentheses y subscript n plus 1 end subscript minus 2 y subscript n plus y subscript n minus 1 end subscript close parentheses over denominator h squared end fraction and open parentheses fraction numerator straight d y over denominator straight d x end fraction close parentheses subscript n almost equal to fraction numerator y subscript n plus 1 end subscript minus y subscript n over denominator h end fraction in the exam question.

Worked Example

A differential equation is given by

fraction numerator straight d squared y over denominator straight d x squared end fraction equals x minus y

where y equals 1 and fraction numerator straight d y over denominator straight d x end fraction equals 0 when x equals 0.

(a) Use the approximation formula open parentheses fraction numerator straight d y over denominator straight d x end fraction close parentheses subscript n almost equal to fraction numerator y subscript n plus 1 end subscript minus y subscript n over denominator h end fraction once to estimate y at x equals 0.1

(b) Use the approximation formula open parentheses fraction numerator straight d squared y over denominator straight d x squared end fraction close parentheses subscript n almost equal to fraction numerator open parentheses y subscript n plus 1 end subscript minus 2 y subscript n plus y subscript n minus 1 end subscript close parentheses over denominator h squared end fraction once to estimate y at x equals 0.2

Answer:

(a)

Find the step size h required to go from x equals 0 to x equals 0.1 in one iteration

h equals 0.1

Substitute n equals 0, y subscript 0 equals 1, open parentheses fraction numerator straight d y over denominator straight d x end fraction close parentheses subscript 0 equals 0 and h equals 0.1 into the formula given

0 equals fraction numerator y subscript 1 minus 1 over denominator 0.1 end fraction

Solve to find y subscript 1

table row cell y subscript 1 end cell equals cell 0.1 cross times 0 plus 1 end cell row cell y subscript 1 end cell equals 1 end table

y almost equal to 1 at x equals 0.1

(b)

From the question

x subscript 0 equals 0 and y subscript 0 equals 1

From part (a)

x subscript 1 equals 0.1 and y subscript 1 equals 1

Substitute n equals 1 into the approximation formula given

open parentheses fraction numerator straight d squared y over denominator straight d x squared end fraction close parentheses subscript 1 almost equal to fraction numerator open parentheses y subscript 2 minus 2 y subscript 1 plus y subscript 0 close parentheses over denominator h squared end fraction

Also substitute in h equals 0.1, y subscript 0 equals 1 and y subscript 1 equals 1

open parentheses fraction numerator straight d squared y over denominator straight d x squared end fraction close parentheses subscript 1 almost equal to fraction numerator open parentheses y subscript 2 minus 2 cross times 1 plus 1 close parentheses over denominator 0.1 squared end fraction

Find open parentheses fraction numerator straight d squared y over denominator straight d x squared end fraction close parentheses subscript 1 by substituting x subscript 1 equals 0.1 and y subscript 1 equals 1 into the differential equation fraction numerator straight d squared y over denominator straight d x squared end fraction equals x minus y

table row cell open parentheses fraction numerator straight d squared y over denominator straight d x squared end fraction close parentheses subscript 1 end cell equals cell x subscript 1 minus y subscript 1 end cell row blank equals cell 0.1 minus 1 end cell row blank equals cell negative 0.9 end cell end table

Substitute table row cell open parentheses fraction numerator straight d squared y over denominator straight d x squared end fraction close parentheses subscript 1 end cell equals cell negative 0.9 end cell end table back into the approximation formula and rearrange to find y subscript 2

table row cell negative 0.9 end cell almost equal to cell fraction numerator open parentheses y subscript 2 minus 2 cross times 1 plus 1 close parentheses over denominator 0.1 squared end fraction end cell row cell y subscript 2 end cell equals cell 0.1 squared cross times open parentheses negative 0.9 close parentheses plus 2 cross times 1 minus 1 end cell row cell y subscript 2 end cell equals cell 0.991 end cell end table

y almost equal to 0.991 at x equals 0.2

What do I do if there is a dy/dx term in the second-order differential equation?

  • If the second-order differential equation has a fraction numerator straight d y over denominator straight d x end fraction term

    • i.e. fraction numerator straight d squared y over denominator straight d x squared end fraction equals straight f open parentheses x comma space y comma fraction numerator straight d y over denominator straight d x end fraction close parentheses

    • then the central difference formula for a first derivative is also needed

      • open parentheses fraction numerator straight d y over denominator straight d x end fraction close parentheses subscript n almost equal to fraction numerator y subscript n plus 1 end subscript minus y subscript n minus 1 end subscript over denominator 2 h end fraction

Examiner Tips and Tricks

You will be given the formulas open parentheses fraction numerator straight d squared y over denominator straight d x squared end fraction close parentheses subscript n almost equal to fraction numerator open parentheses y subscript n plus 1 end subscript minus 2 y subscript n plus y subscript n minus 1 end subscript close parentheses over denominator h squared end fraction , open parentheses fraction numerator straight d y over denominator straight d x end fraction close parentheses subscript n almost equal to fraction numerator y subscript n plus 1 end subscript minus y subscript n minus 1 end subscript over denominator 2 h end fraction and open parentheses fraction numerator straight d y over denominator straight d x end fraction close parentheses subscript n almost equal to fraction numerator y subscript n plus 1 end subscript minus y subscript n over denominator h end fraction in the exam question.

Worked Example

A differential equation is given by

fraction numerator straight d squared y over denominator straight d x squared end fraction equals x minus y plus fraction numerator straight d y over denominator straight d x end fraction

where y equals 1 and fraction numerator straight d y over denominator straight d x end fraction equals 0 when x equals 0.

(a) Use the approximation formula open parentheses fraction numerator straight d y over denominator straight d x end fraction close parentheses subscript n almost equal to fraction numerator y subscript n plus 1 end subscript minus y subscript n over denominator h end fraction once to estimate y at x equals 0.1

(b) Use the approximation formulas open parentheses fraction numerator straight d squared y over denominator straight d x squared end fraction close parentheses subscript n almost equal to fraction numerator open parentheses y subscript n plus 1 end subscript minus 2 y subscript n plus y subscript n minus 1 end subscript close parentheses over denominator h squared end fraction and open parentheses fraction numerator straight d y over denominator straight d x end fraction close parentheses subscript n almost equal to fraction numerator y subscript n plus 1 end subscript minus y subscript n minus 1 end subscript over denominator 2 h end fraction to estimate y at x equals 0.2, giving your answer to 5 decimal places.

Answer:

(a)

Find the step size h required to go from x equals 0 to x equals 0.1 in one iteration

h equals 0.1

Substitute n equals 0, y subscript 0 equals 1, open parentheses fraction numerator straight d y over denominator straight d x end fraction close parentheses subscript 0 equals 0 and h equals 0.1 into the formula given

0 equals fraction numerator y subscript 1 minus 1 over denominator 0.1 end fraction

Solve to find y subscript 1

table row cell y subscript 1 end cell equals cell 0.1 cross times 0 plus 1 end cell row cell y subscript 1 end cell equals 1 end table

y almost equal to 1 at x equals 0.1

(b)

From the question

x subscript 0 equals 0 and y subscript 0 equals 1

From part (a)

x subscript 1 equals 0.1 and y subscript 1 equals 1

Substitute n equals 1 into the first approximation formula given for second derivatives

open parentheses fraction numerator straight d squared y over denominator straight d x squared end fraction close parentheses subscript 1 almost equal to fraction numerator open parentheses y subscript 2 minus 2 y subscript 1 plus y subscript 0 close parentheses over denominator h squared end fraction

Also substitute in h equals 0.1, y subscript 0 equals 1 and y subscript 1 equals 1 (call this equation A)

open parentheses fraction numerator straight d squared y over denominator straight d x squared end fraction close parentheses subscript 1 almost equal to fraction numerator open parentheses y subscript 2 minus 2 cross times 1 plus 1 close parentheses over denominator 0.1 squared end fraction space space space space space space space space table row blank blank cell circle enclose straight A end cell end table

Find open parentheses fraction numerator straight d squared y over denominator straight d x squared end fraction close parentheses subscript 1 by substituting x subscript 1 equals 0.1 and y subscript 1 equals 1 into the differential equation fraction numerator straight d squared y over denominator straight d x squared end fraction equals x minus y plus fraction numerator straight d y over denominator straight d x end fraction (call this equation B)

table row cell open parentheses fraction numerator straight d squared y over denominator straight d x squared end fraction close parentheses subscript 1 end cell equals cell x subscript 1 minus y subscript 1 plus open parentheses fraction numerator straight d y over denominator straight d x end fraction close parentheses subscript 1 end cell row cell open parentheses fraction numerator straight d squared y over denominator straight d x squared end fraction close parentheses subscript 1 end cell equals cell 0.1 minus 1 plus open parentheses fraction numerator straight d y over denominator straight d x end fraction close parentheses subscript 1 end cell row cell open parentheses fraction numerator straight d squared y over denominator straight d x squared end fraction close parentheses subscript 1 end cell equals cell negative 0.9 plus open parentheses fraction numerator straight d y over denominator straight d x end fraction close parentheses subscript 1 space space space space space space space space space space space space space circle enclose straight B end cell end table

This has the term open parentheses fraction numerator straight d y over denominator straight d x end fraction close parentheses subscript 1 which cannot immediately be found

Use the second approximation formula given for first derivatives,with n equals 1, h equals 0.1 and y subscript 0 equals 1

table row cell open parentheses fraction numerator straight d y over denominator straight d x end fraction close parentheses subscript 1 end cell almost equal to cell fraction numerator y subscript 2 minus 1 over denominator 2 cross times 0.1 end fraction end cell end table

Substitute this into equation B

table row cell open parentheses fraction numerator straight d squared y over denominator straight d x squared end fraction close parentheses subscript 1 end cell equals cell negative 0.9 plus fraction numerator y subscript 2 minus 1 over denominator 2 cross times 0.1 end fraction end cell end table

Then substitute this into equation A

table row blank blank minus end table table row blank blank 0 end table table row blank blank. end table table row blank blank 9 end table table row blank blank plus end table table row blank blank cell fraction numerator y subscript 2 minus 1 over denominator 2 cross times 0.1 end fraction end cell end table almost equal to fraction numerator open parentheses y subscript 2 minus 2 cross times 1 plus 1 close parentheses over denominator 0.1 squared end fraction

Now solve for y subscript 2

table row cell negative 0.9 plus fraction numerator y subscript 2 minus 1 over denominator 0.2 end fraction end cell equals cell fraction numerator y subscript 2 minus 1 over denominator 0.01 end fraction end cell row cell negative 0.009 plus 0.05 open parentheses y subscript 2 minus 1 close parentheses end cell equals cell y subscript 2 minus 1 end cell row cell 0.05 open parentheses y subscript 2 minus 1 close parentheses end cell equals cell y subscript 2 minus 0.991 end cell row cell 0.05 y subscript 2 minus 0.05 end cell equals cell y subscript 2 minus 0.991 end cell row cell 0.941 end cell equals cell 0.95 y subscript 2 end cell row cell y subscript 2 end cell equals cell 0.9905263... end cell end table

y almost equal to 0.99053 to 5 d.p. at x equals 0.2

Unlock more, it's free!

Join the 100,000+ Students that ❤️ Save My Exams

the (exam) results speak for themselves:

Mark Curtis

Author: Mark Curtis

Expertise: Maths Content Creator

Mark graduated twice from the University of Oxford: once in 2009 with a First in Mathematics, then again in 2013 with a PhD (DPhil) in Mathematics. He has had nine successful years as a secondary school teacher, specialising in A-Level Further Maths and running extension classes for Oxbridge Maths applicants. Alongside his teaching, he has written five internal textbooks, introduced new spiralling school curriculums and trained other Maths teachers through outreach programmes.