Skip to content
This repository has been archived by the owner on Mar 17, 2022. It is now read-only.

Example 10

Stanislav Mikhel edited this page Jun 29, 2017 · 1 revision

Let's try to solve a simple differential equation with the help of VPSYS.

Assume that we have an equation of mathematical pendulum oscillations

y'' = -(w0)^2 * y(t)

and we have to know y(t). To get it we have to perform an integration twice, on the other hand, second derivative can be obtained with the help of multiplication. It can be written as following chain:

y'' -> integrate (get velocity y') -> integrate (get angle y) -> * -(w0)^2 (get acceleration y'')

Now let's write it using VPSYS.

&XINT speed, angle             # integrals
angle: x0 = %pi/6              # initial angle
&SYNK y                        # print result
%w0 = 2                        # frequency
speed -> angle -> y
angle -> [* (-%w0*%w0)] speed  # create scheme
Run 5, 0.1                     # calculate for range of 5 seconds
Clone this wiki locally