|
Funtest |
Top Previous Next |
|
{ FUNTEST.PDE }
{ ******************************************************************** This example illustrates available mathematical functions in FlexPDE, as well as the use of FlexPDE as a plot utility. ******************************************************************** }
title "Test Functions"
{ -- No variables, no equations -- }
{ -- Definitions can be included, if desired -- }
{ -- We need a plot domain: -- } boundaries region 1 start(-1,-0.1) line to (1,-0.1) to (1,0.1) to (-1,0.1) to close
plots elevation(sqrt(x)) from (0,0) to (1,0) elevation(dx(sqrt(x)),0.5/sqrt(x)) from (0.01,0) to (1,0)
elevation(sin(pi*x)) from (-1,0) to (1,0) elevation(dx(sin(pi*x)),pi*cos(pi*x)) from (-1,0) to (1,0)
elevation(cos(pi*x)) from (-1,0) to (1,0) elevation(dx(cos(pi*x)),-pi*sin(pi*x)) from (-1,0) to (1,0)
elevation(tan(pi*x)) from (-0.499,0) to (0.499,0) elevation(dx(tan(pi*x)),pi/cos(pi*x)^2) from (-0.499,0) to (0.499,0)
elevation(exp(x)) from (-1,0) to (1,0) elevation(dx(exp(x)),exp(x)) from (-1,0) to (1,0)
elevation(ln(x)) from (0.01,0) to (1,0) elevation(dx(ln(x)),1/x) from (0.01,0) to (1,0)
elevation(log10(x)) from (0.01,0) to (1,0) elevation(dx(log10(x)),1/(x*ln(10))) from (0.01,0) to (1,0)
elevation(arcsin(x)) from (-1,0) to (1,0) elevation(dx(arcsin(x)),1/sqrt(1-x^2)) from (-0.999,0) to (0.999,0)
elevation(arccos(x)) from (-1,0) to (1,0) elevation(dx(arccos(x)),-1/sqrt(1-x^2)) from (-0.999,0) to (0.999,0)
elevation(arctan(x)) from (-1,0) to (1,0) elevation(dx(arctan(x)),1/(1+x^2)) from (-1,0) to (1,0)
elevation(abs(x)) from (-1,0) to (1,0) elevation(dx(abs(x))) from (-1,0) to (1,0)
elevation(sinh(x)) from (-1,0) to (1,0) elevation(dx(sinh(x)),cosh(x)) from (-1,0) to (1,0)
elevation(cosh(x)) from (-1,0) to (1,0) elevation(dx(cosh(x)),sinh(x)) from (-1,0) to (1,0)
elevation(tanh(x)) from (-1,0) to (1,0) elevation(dx(tanh(x)),1/cosh(x)^2) from (-1,0) to (1,0)
elevation(erf(x)) from (-1,0) to (1,0) elevation(dx(erf(x)),2*exp(-x^2)/sqrt(pi)) from (-1,0) to (1,0)
elevation(erfc(x)) from (-1,0) to (1,0) elevation(dx(erfc(x)),-2*exp(-x^2)/sqrt(pi)) from (-1,0) to (1,0)
elevation(sign(x)) from (-1,0) to (1,0) elevation(dx(sign(x))) from (-1,0) to (1,0)
elevation(x**(-4)) from (0.01,0) to (0.1,0) elevation(dx(x**(-4)),-4*x**(-5)) from (0.01,0) to (0.1,0)
elevation(x**(2*x)) from (0.001,0) to (1,0) elevation(dx(x**(2*x)),2*x**(2*x)*(1+ln(x))) from (0.001,0) to (1,0)
elevation(bessj(0,20*x),bessj(1,20*x),bessj(2,20*x)) from (0,0) to (1,0) elevation(bessy(0,20*x),bessy(1,20*x),bessy(2,20*x)) from (0.05,0) to (1,0) elevation(dx(bessj(0,20*x)),-20*bessj(1,20*x)) from (0,0) to (1,0) elevation(dx(bessj(1,20*x)),20*(bessj(1,20*x)/(20*x)-bessj(2,20*x))) from (0.001,0) to (1,0)
elevation(expint(1,2*x),expint(2*x)) from (0.001,0) to (1,0) elevation(1/gammaf(1,2*x),1/gammaf(2*x)) from (0.001,0) to (1,0)
end |