standard_functions

<< Click to Display Table of Contents >>

Navigation:  Sample Problems > Usage > Functions >

standard_functions

Previous pageReturn to chapter overviewNext page

{ STANDARD_FUNCTIONS.PDE

 

  This example illustrates available mathematical functions in FlexPDE.  

  It also shows the use of FlexPDE as a plot utility.

 

}  

title "Test Standard Functions"  

 

coordinates cartesian1  

 

{ -- No variables, no equations -- }  

 

{ -- Definitions can be included, if desired -- }  

 

{ -- We need a plot domain: -- }  

boundaries  

  region 1  

    start(-1) line to (1)  

 

plots  

  elevation(sqrt(x)) from (0) to (1)  

  elevation(dx(sqrt(x)),0.5/sqrt(x)) from (0.01) to (1)  

 

  elevation(sin(pi*x)) from (-1) to (1)  

  elevation(dx(sin(pi*x)),pi*cos(pi*x)) from (-1) to (1)  

 

  elevation(cos(pi*x)) from (-1) to (1)  

  elevation(dx(cos(pi*x)),-pi*sin(pi*x)) from (-1) to (1)  

 

  elevation(tan(pi*x)) from (-0.499) to (0.499)  

  elevation(dx(tan(pi*x)),pi/cos(pi*x)^2) from (-0.499) to (0.499)  

 

  elevation(exp(x)) from (-1) to (1)  

  elevation(dx(exp(x)),exp(x)) from (-1) to (1)  

 

  elevation(ln(x)) from (0.01) to (1)  

  elevation(dx(ln(x)),1/x) from (0.01) to (1)  

 

  elevation(log10(x)) from (0.01) to (1)  

  elevation(dx(log10(x)),1/(x*ln(10))) from (0.01) to (1)  

 

  elevation(arcsin(x)) from (-1) to (1)  

  elevation(dx(arcsin(x)),1/sqrt(1-x^2)) from (-0.999) to (0.999)  

 

  elevation(arccos(x)) from (-1) to (1)  

  elevation(dx(arccos(x)),-1/sqrt(1-x^2)) from (-0.999) to (0.999)  

 

  elevation(arctan(x)) from (-1) to (1)  

  elevation(dx(arctan(x)),1/(1+x^2)) from (-1) to (1)  

 

  elevation(abs(x)) from (-1) to (1)  

  elevation(dx(abs(x))) from (-1) to (1)  

 

  elevation(sinh(x)) from (-1) to (1)  

  elevation(dx(sinh(x)),cosh(x)) from (-1) to (1)  

 

  elevation(cosh(x)) from (-1) to (1)  

  elevation(dx(cosh(x)),sinh(x)) from (-1) to (1)  

 

  elevation(tanh(x)) from (-1) to (1)  

  elevation(dx(tanh(x)),1/cosh(x)^2) from (-1) to (1)  

 

  elevation(sech(x)) from (-1) to (1)

  elevation(dx(sech(x)),-sinh(x)/cosh(x)^2) from (-1) to (1)

 

  elevation(coth(x)) from (-1) to (1) fixed range(-10,10)

  elevation(dx(coth(x)),-1.0/sinh(x)^2) from (-1) to (1) fixed range(-20,0)

 

  elevation(csch(x)) from (-1) to (1) fixed range(-10,10)

  elevation(dx(csch(x)),-cosh(x)/sinh(x)^2) from (-1) to (1) fixed range(-20,0)

 

  elevation(erf(x)) from (-1) to (1)  

  elevation(dx(erf(x)),2*exp(-x^2)/sqrt(pi)) from (-1) to (1)  

 

  elevation(erfc(x)) from (-1) to (1)  

  elevation(dx(erfc(x)),-2*exp(-x^2)/sqrt(pi)) from (-1) to (1)  

 

  elevation(sign(x)) from (-1) to (1)  

  elevation(dx(sign(x))) from (-1) to (1)  

 

  elevation(x^(-4)) from (0.01) to (0.1)  

  elevation(dx(x^(-4)),-4*x^(-5)) from (0.01) to (0.1)  

 

  elevation(x^(2*x)) from (0.001) to (1)  

  elevation(dx(x^(2*x)),2*x^(2*x)*(1+ln(x))) from (0.001) to (1)  

 

  elevation(bessj(0,20*x),bessj(1,20*x),bessj(2,20*x)) from (0) to (1) as "Bessel J0,J1,J2"

  elevation(bessy(0,20*x),bessy(1,20*x),bessy(2,20*x)) from (0.05) to (1) as "Bessel Y0,Y1,Y2"

  elevation(dx(bessj(0,20*x)),-20*bessj(1,20*x)) from (0) to (1) as "dx(J0)"

  elevation(dx(bessj(1,20*x)),20*(bessj(1,20*x)/(20*x)-bessj(2,20*x))) from (0.001) to (1) as "dx(J1)"

 

  elevation(expint(1,2*x),expint(2*x)) from (0.001) to (1)  

  elevation(1/gammaf(1,2*x),1/gammaf(2*x)) from (0.001) to (1)  

 

end