#include #include "StatTools/Funct/Variables.h" #include "StatTools/Funct/FunctManip.h" #include "StatTools/Funct/FunctIO.h" using namespace std; using namespace Funct; int main() { X x; Y y; cout << "$ (" << x << ") dx = " << primitive( x ) << endl; cout << "$ (" << pow( x, num<4>() ) << ") dx = " << primitive( pow( x, num<4>() ) ) << endl; cout << "$ (" << pow( x, - num<4>() ) << ") dx = " << primitive( pow( x, -num<4>() ) ) << endl; cout << "$ " << sin( x ) << " dx = " << primitive( sin( x ) ) << endl; cout << "$ " << cos( x ) << " dx = " << primitive( cos( x ) ) << endl; cout << "$ " << exp( x ) << " dx = " << primitive( exp( x ) ) << endl; cout << "$ " << num<1>() / x << " dx = " << primitive( num<1>() / x ) << endl; cout << "$ " << 1 / pow( cos(x), num<2>() ) << " dx = " << primitive( num<1>() / pow( cos(x), num<2>() ) ) << endl; cout << "$ " << 1 / pow( sin(x), num<2>() ) << " dx = " << primitive( num<1>() / pow( sin(x), num<2>() ) ) << endl; cout << "$ " << sqrt( x ) << " dx = " << primitive( sqrt( x ) ) << endl; cout << "$ ( " << ( sin( x ) + cos( x ) ) << " ) dx = " << primitive( sin( x ) + cos( x ) ) << endl; cout << "$ ( " << ( sin( x ) - cos( x ) ) << " ) dx = " << primitive( sin( x ) - cos( x ) ) << endl; cout << "$ ( " << ( num<4>() * cos( x ) ) << " ) dx = " << primitive( num<4>() * cos( x ) ) << endl; cout << "$ ( " << ( - sin( x ) ) << " ) dx = " << primitive( - sin( x ) ) << endl; cout << "$ ( " << y << " ) dx = " << primitive( y ) << endl; cout << "$ ( " << x * y << " ) dx = " << primitive( x * y ) << endl; cout << "$ ( " << y * x << " ) dx = " << primitive( y * x ) << endl; cout << "$ ( " << y / pow( sin( x ), num<2>() ) << " ) dx = " << primitive( y / pow( sin( x ), num<2>() ) ) << endl; cout << "$ ( " << y / pow( sin( x ), num<2>() ) << " ) dx dy= " << primitive( primitive( y / pow( sin( x ), num<2>() ) ) ) << endl; cout << "$ " << log( x ) << " dx = " << primitive( log( x ) ) << endl; cout << "$ " << x * exp( x ) << " dx = " << primitive( x * exp( x ) ) << endl; cout << "$ " << pow( x, num<2>() ) * exp( x ) << " dx = " << primitive( pow( x, num<2>() ) * exp( x ) ) << endl; cout << "$ " << pow( x, num<3>() ) * exp( x ) << " dx = " << primitive( pow( x, num<3>() ) * exp( x ) ) << endl; cout << "$ " << x * sin( x ) << " dx = " << primitive( x * sin( x ) ) << endl; cout << "$ " << pow( x, num<2>() ) * sin( x ) << " dx = " << primitive( pow( x, num<2>() ) * sin( x ) ) << endl; cout << "$ " << pow( x, num<3>() ) * sin( x ) << " dx = " << primitive( pow( x, num<3>() ) * sin( x ) ) << endl; cout << "$ " << x / pow( cos( x ), num<2>() ) << " dx = " << primitive( x / pow( cos( x ), num<2>() ) ) << endl; return 0; }