Polymath tutorial on Ordinary Differential Equation Solver, Study notes of Differential Equations

The following is the differential equation we want to solve using Polymath ... To use the ODE solver in Polymath, first click on the โ€œProgramโ€ tab present ...

Typology: Study notes

2021/2022

Uploaded on 09/07/2022

nabeel_kk
nabeel_kk ๐Ÿ‡ธ๐Ÿ‡ฆ

4.6

(65)

1.3K documents

1 / 10

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Polymath tutorial on Ordinary Differential Equation Solver
The following is the differential equation we want to solve using Polymath
๐‘‘๐ถ๐‘Ž
๐‘‘๐‘ก = โˆ’๐‘˜1๐ถ๐‘Ž ๐ถ๐‘
๐‘‘๐ถ๐‘
๐‘‘๐‘ก = โˆ’๐‘˜1๐ถ๐‘Ž ๐ถ๐‘
At t=0, ๐ถ๐‘Ž = 0.5 and ๐ถ๐‘ = 0.5
and integration time span is t= 0 to t=30
First, launch Polymath which you can download from http://www.polymath-software.com. You
will see a window that looks like this.
To use the ODE solver in Polymath, first click on the โ€œProgramโ€ tab present on the toolbar. This will
bring up a list of options from which you need to select. In this case we need to solve differential
equations so select "DEQ Differential Equations". The shortcut button โ€œdxโ€ for differential equation
solver is also present on the menu bar ( ) as shown by red circle in below screenshot
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Polymath tutorial on Ordinary Differential Equation Solver and more Study notes Differential Equations in PDF only on Docsity!

Polymath tutorial on Ordinary Differential Equation Solver

The following is the differential equation we want to solve using Polymath

At t=0, ๐ถ๐‘Ž = 0.5 and ๐ถ๐‘ = 0.

and integration time span is t= 0 to t=

First, launch Polymath which you can download from http://www.polymath-software.com. You

will see a window that looks like this.

To use the ODE solver in Polymath, first click on the โ€œProgramโ€ tab present on the toolbar. This will

bring up a list of options from which you need to select. In this case we need to solve differential

equations so select "DEQ Differential Equations". The shortcut button โ€œdxโ€ for differential equation

solver is also present on the menu bar ( ) as shown by red circle in below screenshot

This will open up another window, which looks like this.

To enter the differential equations, press the " d(x) +

" button ( ) present on the menu bar

(shown by red circle in the below screenshot). This will bring up a dialogue box in which you can

enter your differential equation. You will also need to specify an initial value for the differential

variable.

In the above dialogue box, only one differential equation can be entered at one time

Repeat the similar exercise to enter the equations for 2

nd

differential equation

After pressing Done, your main window will look like this

In the window above, there is a variable that has not been specified, as indicated by the red X. The

information following the X will tell you what variables have not been specified. Here, it shows

that k1 is an undefined variable.

Now, to specify the value of k 1 , press " x= +

" button (shown by red circle in below screen). Pressing

this button brings up a different dialogue box in which you can specify explicit equations in your

system.

In this case, we only have one variable i.e.

Enter the value of ๐‘˜1 in the space provided in the rectangular box as shown below

Now, enter the final value of t i.e. t=

Press OK. When all of the necessary information has been specified, the screen will look like this.

You can check that X is now replaced by โ€œReady for solutionโ€

You can choose the method of ODE solver you would like to use by selecting the option from the

drop down menu present next to RKF45. By default, polymath uses RKF45 method. In this case,

we will choose RKF

Now select what you want polymath to output by checking the boxes on the right side of the

window. The simulation will output results depending on what is selected. The options available

are Table, Graph, and Report. Select the appropriate option and then Click on the pink

arrow to have Polymath perform the integration.

If you selected "Report" then following screen will be displayed.

Selecting "Table" will cause a data table to be generated. It includes the values of the variables at

each different step in the differential variable, in this case, time t.

To get an output that you had not previously selected, you will need to check the corresponding box

and rerun the simulation by clicking on the pink arrow.