Author: Patrik Lundin, patrik lundin.info
The applet is available for download here
Quick start:
- Write an equation on the form f(x) = g(x) in the equation field.
If you leave out the equality sign, then = 0 will be assumed.
- Give a startvalue close to the root ( guess one ).
- Give the number of iterations you want ( start with a low value ).
- Press the start button.
- Check the value, is it reasonable? If not, it has diverged.
Press stop to stop iterating, press continue to start iterating
again using the last calculated value as startvalue.
|
Examples:
|
A convergent equation.
x=sin(x)-3 , startvalue -2
x= -3.3482340796530266 after 1 iterations.
x= -3.0685550570975795 after 2 iterations.
x= -3.0707668155969694 after 3 iterations.
x= -3.0707667271420402 after 4 iterations.
x= -3.0707667271420402 after 5 iterations.
|
A divergent equation.
1/x=5 , startvalue 2
x= -16.0 after 1 iterations.
x= -1312.0 after 2 iterations.
x= -8609344.0 after 3 iterations.
x= -3.70604037770368E14 after 4 iterations.
x= -6.867367640585025E29 after 5 iterations.
|
You can use the following operators:
+ - * / ^ sin(..) cos(..) tan(..) asin(..) acos(..) atan(..) sinh(..) cosh(..) tanh(..) cotan(..)
acotan(..) sqrt(..) ln(..) exp(..)
where exp is "constant e raised to..." and ^ is "power to..".
Predefined constants are:
euler which is the same as exp(1), and pi.
This Applet uses the info.lundin.math class library.
It actually performs a symbolic derivation of the equation before calculating the value.
For more information go to this page
|