commonTransformations.frink

View or download commonTransformations.frink in plain text format


/** Sample program to demonstrate doing symbolic math.  Depending on what
    transformations are loaded below, this can solve equations, perform
    derivatives, etc.

    For example, try:
       solve[x^2 + 2x - 3 === y, x]

    or
       D[x sin[x], x]

    The real magic happens in the "transformExpression" call which transforms
    an expression using the symbolic transformation rules currently loaded.
*/

use derivatives.frink
use solvingTransformations.frink

showApproximations[false]
symbolicMode[true]

while (text = input["Enter expression: "] )
{
   expr = parseToExpression[text]

   res = transformExpression[expr]
   println[]
   println[res]
   println[]
   println[eval[res]]
}
 


View or download commonTransformations.frink in plain text format


This is a program written in the programming language Frink.
For more information, view the Frink Documentation or see More Sample Frink Programs.

Alan Eliasen was born 17651 days, 5 hours, 15 minutes ago.