Hobbies And Interests
Home  >> Science & Nature >> Science

How to Solve an Ode Using Picard in Maple

Calculus is a sub-set of mathematics that involves study of differentiation, and integration. Differentiation is the operation which generates a function describing the gradient of the initial function. Integration is the operation that generates a function describing the area under the graph of the initial function. Ordinary differential equations (ODE) are commonly found in physics and engineering and contain only one independent variable. ODE's can be solved by direct integration or by applying a numerical method. Maple is a mathematical program that is used for solving problems and can be used to solve ODEs using a numerical Picard iterative method.

Things You'll Need

  • Maple
Show More

Instructions

    • 1

      Run Maple and create a new Maple worksheet.

    • 2

      Define the ordinary differential equation function in Maple. This can be done using the line:
      "f:= (x,y) ͛4; x + y^2"

      In this case x + y^2 is the defined function

    • 3

      Set the starting value for x (dependent variable). This can be done using the line:

      "a:=0"

      In this case a is being set to zero.

    • 4

      Set the starting value for y (independent variable). This can be done using the line:

      "φ0:=0"

      In this case φ is being set to zero.

    • 5

      Set the number of iterations. This is the number of times, the Picard iteration is applied to the equation. It can be set using the line:

      "N:=3"

      In this case three iterations are being performed

    • 6

      Run the Picard method. This can be done using the following code:

      for k from 0 to N-1 do
      φk+1:=unapply( φ0 + ͪ7;(f(t,φk(t) dt x)
      print(nprintf("Iteration number %d",k+1)
      print(φk+1(x))
      end do

      The iterative solution will be displayed when the code has been run.


https://www.htfbw.com © Hobbies And Interests