SyFi  0.3
simple2.cpp File Reference
#include <SyFi.h>

Go to the source code of this file.

Functions

int main ()

Function Documentation

int main ( )

Definition at line 7 of file simple2.cpp.

References run_tests::f, SyFi::initSyFi(), SyFi::x, and SyFi::y.

           {

    initSyFi(1); 

    // initialization (f = x^2 + y^2) 
    ex f = x*x + y*y; 
    cout <<"f "<<f<<endl; 

    // differentiation (dfdx = df/dx = 2x) 
    ex dfdx = f.diff(x,1);  
    cout <<"dfdx "<<dfdx<<endl; 

    // integration (intf = 1/3+y^2, integral of f(x,y) from x=0 to x=1) 
    ex intf = integral(x,0,1,f); 
    cout <<"intf "<<intf<<endl; 
    intf = eval_integ(intf); 
    cout <<"intf "<<intf<<endl; 

    return 0; 
}
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator