Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Search for

# 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 5 of file simple2.cpp. References x, and y.
    00005            {
    00006   // initialization (f = x^2 + y^2)
    00007   ex f = x*x + y*y;
    00008   cout <<"f "<<f<<endl;
    00009
    00010   // differentiation (dfdx = df/dx = 2x)
    00011   ex dfdx = f.diff(x,1);
    00012   cout <<"dfdx "<<dfdx<<endl;
    00013
    00014   // integration (intf = 1/3+y^2, integral of f(x,y) from x=0 to x=1)
    00015   ex intf = integral(x,0,1,f);
    00016   cout <<"intf "<<intf<<endl;
    00017   intf = eval_integ(intf);
    00018   cout <<"intf "<<intf<<endl;
    00019
    00020   return 0;
    00021 }