X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=check%2Fdifferentiation.cpp;h=348b5fd5bd2121c6853f5cdacc2d6412726fae58;hp=611342d0cdfc9a9ce9ef5170dde5314c5cd154fa;hb=26741891dadf23162799009b6fd57b4984bd4ce5;hpb=e77c6caedf8171dc54d7470798f03ce4a0d1ad24 diff --git a/check/differentiation.cpp b/check/differentiation.cpp index 611342d0..348b5fd5 100644 --- a/check/differentiation.cpp +++ b/check/differentiation.cpp @@ -21,7 +21,10 @@ */ #include + +#ifndef NO_GINAC_NAMESPACE using namespace GiNaC; +#endif // ndef NO_GINAC_NAMESPACE static unsigned check_diff(const ex &e, const symbol &x, const ex &d, unsigned nth=1) @@ -234,10 +237,16 @@ static unsigned differentiation5(void) pow(y*b+pow(y,2)*x+a,-2)*pow(y,2))* pow(1+pow(a*x+b+y*pow(x,2),2)*pow(y*b+pow(y,2)*x+a,-2),-1); */ + /* d = pow(1+pow(a*x+b+y*pow(x,2),2)*pow(y*b+pow(y,2)*x+a,-2),-1) *pow(y*b+pow(y,2)*x+a,-1)*(a+2*y*x) +pow(y,2)*(-a*x-b-y*pow(x,2))* pow(pow(y*b+pow(y,2)*x+a,2)+pow(a*x+b+y*pow(x,2),2),-1); + */ + d = pow(y,2)*pow(pow(b+y*pow(x,2)+x*a,2)+pow(y*b+pow(y,2)*x+a,2),-1)* + (-b-y*pow(x,2)-x*a)+ + pow(pow(b+y*pow(x,2)+x*a,2)+pow(y*b+pow(y,2)*x+a,2),-1)* + (y*b+pow(y,2)*x+a)*(2*y*x+a); result += check_diff(e, x, d); return result;