Differential
equation solvers + Laplace v. 2.06
|
Author : | Lars Frederiksen |
Syntax : | Look at the descriptive ... |
Require : |
All files generated by the *.xxg |
When installed using TI-Graph Link the files will be placed in a folder named "dif". Before using the functions make the "dif"-folder to the current folder. Do not create any variable in the "dif"-folder.
The package include following programs and functions:
Prepare the programs for archiving and archiving them. |
|
Make the programs adapt a new language |
|
Online help to programs. |
|
Differential equation solver. |
|
Verifying the results from SlvD. |
|
Menu() |
Custom help menu. |
Simultaneous differential equations solver. |
|
Laplace transformation |
|
Inverse Laplace transformation. |
Other files in the package are all sub functions or data for above functions.
Archiving on TI-89 and TI-92+
All variables can be archived on the TI-89 and TI-92+. Functions and programs can also be archived, but first after they have been used one time each. If the programs have not been run before archiving, the calculator has to compile them each time they are used, this will slow down the execution time of the programs.
The Install program will perform this preparation and archiving. Just execute following command from the command line: dif\install(). The install program "install()" and it's sub program "archiv()" can be deleted after installation.
Changing language under AMS 2.03
Syntax: Language()
Syntax: Help()
This program will give online information about and demonstrate the use of functions in this package. When you do not need this program any longer just delete it and the data file "hlp".
Functions in help |
key |
Scroll left |
left arrow |
Scroll right |
right arrow |
Scroll down |
down arrow |
Scroll up |
up arrow |
Page down |
2nd down arrow |
Page up |
2nd up arrow |
Half screen left |
2nd left arrow |
Half screen right |
2nd right arrow |
Jump between main help items |
F1 F7 |
Chose sub menus |
1 9 |
Differential equation solver
This solver will find the solution to most common differential equations.
The methods the program is using can basically be split up in two types:
NOTE: TI-89/TI-92+ can solve single differential equation with an order<3.
Syntax for solver:
SlvD(equation, independent var, dependent var)
SlvD({equation, t0, y(t0), y(t0), y(t0), y(t0), ......}, independent var, dependent var)
The result when solving without initial conditions will contain constants with the name cc1-cc9, which are arbitrary constants.
Following constant names is reserved for the program and may not be used in equations or initial conditions: cc1-cc9 and all constants with two or more characters starting with a Greek char.
Equation:
A derivative of a function is written: 'prefix'+name+order. The default prefix is the letter 'd', but storing another letter in the variable "dif/prefix" will change it. The order can be a number from 1-9.
Example where the function name is y:
y is written "y"
y is written "dy2"
y is written "dy3"
...
...
y''''''''' is written "dy9"
Initial conditions
t0 is the initial time for all conditions
y(t0) is the wanted result if solution is evaluated to time t0
y(t0) is the wanted result if solution is differentiated and evaluated to time t0
...
Examples of solving equations without initial conditions.
Example 1: solving a linear first order equation
On the command line write:
Result on the home screen:
Where cc1 is an arbitrary constant.
Example 2: Linear, nonhomogeneous third order equation
On the command line write:
slvd(dy3+dy2+dy+y=tan(t),t,y)
Result on the home screen:
Example 3: general solutions to Linear, nonhomogeneous second order equations.
On the command line write:
Result:
Examples of solving equations with initial condition.
Example 1: separable equation
On the command line write:
slvd({y*t*dy+Ö (y)=0,5,3}, t, y)
Result on the home screen:
Example 2: third order linear equation
On the command line write:
Result:
Check solutions from SlvD
Verifying the solutions from SlvD by inserting them into the original equation. It can only verify a solution, if it can isolate the dependent variable. If there is more than one solution, then it will only verify the first solution it finds.
This function can check many solutions, but not all. The solution may be too complex to that it is possible to isolate the dependent variable or the solutions may be so big that the calculator runs out of memory when trying to insert the solution in the equation. In the complex case the only way to check the result may be to manually try to isolate the dependent variable and insert the found solution in to the equation. In the case where the solution is to big for the calculator to handle it may be necessary to us one of the math programs to PCs to check the result.
Syntax:
Chk(equation, independent var, dependent var, solution from SlvD)
Chk({equation, t0, y(t0), y'(t0), ...}, independent var, dependent var, solution from SlvD)
Return: solution from SlvD inserted in the original equation.
Simultaneous differential equation solver
Solving multiple simultaneous differential equations. The Principe in this function is, first it will transform the equations in to the Laplace-domain and second it solves the equations as a system of linear equations, third it transforms the solutions back to the time-domain (see Laplace/iLaplace for further information about Laplace-transformation).There are very few rules to obey when using SimultD. First, there has to be an equal number of equations and unknown variables. Second, the variable has to be a function of the type f(var). Equations do not need to be of same order. In Principe SimultD can solve any number of simultaneous differential/integral equations of any order or mixture of different orders, if there are a sufficient number of equations. The only limitation is the size of the calculator's memory (if it is a very complex solution, it can run out of memory). Following constant names is reserved for the program and may not be used in equations or initial conditions: 's' and all constants with two or more characters starting with a Greek char.Heaviside/Dirac delta functions may be used in equations (see Laplace/iLaplace for further information).
SimultD([equation1;equation2;...], [f1(var),f1(0),f1'(0),..;f2(var), f2(0),f2'(0),..;f3(var).. ])
equation1; equation2;..... |
Differential/Integral equations separated by ';. A derivative of a function is written: d(f(x),x,n) where "d()" is the normal differentiation function on the calculator and 'n' is the order. Integrals of a function is written: ò f(x),x) or d(f(x),x,-n). Where ò () is the calculators normal integral-function. |
f1(var), f1(0), f1(0),.... |
Functions to solve for and belonging initial conditions separated by ';'. |
Example 1:
Solve for t>=0 the first-order simultaneous differential equation
Initial conditions x=2 and y=1 at t=0
First store the equations in a variable:
Result:
To solve the equations on the command line write:
Result on the home screen:
Laplace transform
Function, which will perform Laplace transformation.
Following constant names is reserved for the program: all constants with two or more characters starting with a Greek char.
f(var) |
Can be almost any expression, which have a Laplace transform. |
Var |
Is the name of the variable to transform normally 't', but can be any name. |
Special transforms:
Unit step function (Heaviside function):
Dirac delta function:
Laplace(d (t - a),t) = e^(-a*s)
Functions/derivatives of functions: only f(var)
Laplace(d(f(t - a),t,2),t) = s^2*f(s)-s*f0-f1
You can get 'delta' by pressing 'green diamond' + G + D on TI-92.
Example 1: Find the Laplace transform of sin(t)^2
On the command line write:
Result on the home screen:
Example 2: Find the Laplace transform of cos(t)*u(t-4)
On the command line write:
Result on the home screen
Inverse Laplace transform
Function, which will perform Inverse Laplace transformation.
Following constant names is reserved for the program: all constants with two or more characters starting with a Greek char.
This is a special inverse Laplace function, designed to use in connection with solving of differential equations or equal. It does NOT return Dirac Delta or Heaviside functions. If there is a need for those use the inverse Laplace function from Laplace89/Laplace92.
Syntax: iLaplace(F(var), var):
F(var) |
can be any proper fraction. |
var |
is the name of the variable to transform normally 's', but can be any name. |
This function cannot transform integrals.
Special transforms:
It can transform all functions, which does NOT have a point in which it goes against infinity. The result of the transformation will be wrong, if the function does not obey this rule.
Examples of special function, which can be transformed:
sin(f(s))/g(s) (sinus does in no point goes against infinity)
cos(f(s))/g(s)
exp(s^n)/g(s) where n={1,2,3,4....}
...
Examples of special function, which can NOT be transformed:
tan(f(s))/g(s) (limit(tan(f(s)),f(s),pi/2+n*2pi)=infinity)
arctan(f(s))/g(s)
ln(f(s))/g(s)
exp(1/s^n)/g(s)
...
Example 1:
On the command line write:
iLaplace(b/((s+a)^2+b^2),s)
Result on the homescreen:
Example 2:
Write on the command line:
iLaplace(e^(s^2)/(s+5)^2,s)
Result on the home screen:
About the files in the package
These programs are quit big if you do not need them all, some space can be gained by deleting some of the files. The following list tell which files are used by the individual functions:
Function/ Program |
Operation |
Files |
SlvD |
Separable equations, Linear first order equations, Bernoulli's equations, Exact equations, Homogeneous equations. |
slvd, nlin1,xfml2, prefix |
SlvD |
Linear, homogeneous 2-9th order equations, Euler or Cauchy 2-9th order equations. |
slvd,prefix,nlin2,xfml,xeul,int1,xfun1,xfun2,xfun3,xnum, xnum1 |
Laplace |
Laplace transformation |
laplace, lapsub |
iLaplace |
inverse Laplace transformation |
ilaplace,int1, xfun1,xfun2,xfun3,xnum |
SimultD |
Simultaneous differential equations |
simultd, laplace, lapsub, ilaplace, int1, xfun1,xfun2,xfun3,xnum |
Help |
Online help |
help,hlp |
Chk |
Checking results from SlvD |
chk |
Install |
Installation program |
install, archiv |
An example: if you have a TI-92/TI-92II and only want a solver like the DESolve of the TI-89/TI92+ then all files except slvd, nlin1, xfml2 and prefix can be deleted.