dsolve0(a_,y_,x_,2):= if(has(a,y) and hasnot(a,x), int(1/sqrt(int(a,y)),y)=C_1+sqrt(2)*x ); dsolve0(b_,y_,x_,1):=if(has(b,y/x), int(1/(replace(b,y/x,zz)-zz),zz,1,y/x)-log(x)+C_1=0); dsolve0(c_, y_,x_,-1) := if(isfree(c,y),d(c,x), dsolve(d(replace(c,y,y(x)),x)-y)); dsolve0(f_,y_,x_,0):= f=y; dsolve0(a_+b_,y_,x_,p_):= if(p>1 and has(b,y), if(p==2 and hasnot(a,b,x), int(1/sqrt(C_1+2int(a+b,y)),y)=C_2+x, if(has(a,x),block(k:=dsolve(expand(a+b),y), if(hasnot(k,y) and hasnot(d(k,x,round(p-0.6)),x), k, if(hasnot(k,y) and has(k,C_1) and hasnot(d(replace(k,C_1,0),x,round(p-0.6)),x), replace(k,C_1,0) )))))); dsolve0(a_+b_*y_, y_,x_,q_) := if(hasnot(a,y), gsolution(b,y,x,q)+psolution(b,a,y,x,q)); dsolve0(a_+(c_+x_)*z_,y_,x_,p_):=if(hasnot(a,c,z,x),block(f:=dsolve(a+x*z,y,x,p), replace(f,x,c+x)) ); dsolve0((c_+x_)*z_,y_,x_,p_):=if(hasnot(c,z,x),block(f:=dsolve(x*z,y,x,p), replace(f,x,c+x)) ); dsolve0((c_+x_)^n_*z1_,y_,x_,p_):=if(hasnot(c,x),block(f:=dsolve(x^n*z1,y,x,p), replace(f,x,c+x)) ); dsolve0(a_*b_,y_,x_,1):=if(hasnot(a,y) and has(b,y) and hasnot(b,x), int(1/b,y)=int(a,x)+C_1, if(has(a,y) and hasnot(a,x) and has(b,x) and hasnot(b,y), int(1/a,y)=int(b,x)+C_1 )); dsolve0(1/b_, y_,x_,n_) := if(has(b,y),if(has(b,x), dsolve(replace(b,x,zz),zz,y,n)-x=0,int(b,y,n)=C_1+x^n/n! )); dsolve0(b_*y(p_,x_)^n_,y_,x_,q_):= if(isfree(b,y),if(isfree(b,x), if(n== -1, gsolution(0,y,x,p)+sqrt(b)/sqrt(fallingfactorial((p+q)/2,p)*fallingfactorial((p+q)/2,q))*(C_1+x)^((p+q)/2), if(q-p==1,block(p:=int((C_1-(n-1)*integrate(b,x))^(1/(1-n)),x,p), if(isodd(n), -p and p, p)+gsolution(0,y,x,p)), int(dsolve(b*y^n,y,x,q-p),x,p)+gsolution(0,y,x,p))), if(hasnot(b,x) and n<>2, int(((2-n)*int(b,y,q-p)+C_1)^(1/(n-q)),y,p)=(C_2+x) ))); dsolve0(b_/y(p_,x_),y_,x_,q_) := if(has(b,y) and hasnot(b,x), int(1/cbrt(C_1+3int(b,y,p)),y)=x+C_1, if(hasnot(b,y), if(q-p==1, gsolution(0,y,x,p)-int(sqrt(C_1+2int(b,x)),x,p) and gsolution(0,y,x,p)+int(sqrt(C_1+2int(b,x)),x,p), block(g:=int(dsolve(b/y,y,x,q-p),x,p), gsolution(0,y,x,p)+g) ))); dsolve0(b_/y(1,x_),y_,x_,2) := if(has(b,y) and hasnot(b,x), int(1/cbrt(C_1+int(b,y)),y)=cbrt(3)*x+C_1, if(has(b,x) and hasnot(b,y), C_1-int(sqrt(C_1+2int(b,x)),x) and C_1+int(sqrt(C_1+2int(b,x)),x) )); dsolve0(b_*y(1,x_)^2,y_,x_,2):=if(hasnot(b,y),if(hasnot(b,x), C_2 - log(C_1 - b*x)/b and C_2 - log(C_1 + b*x)/b, C_1 and -int(1/int(b,x),x)+C_1) ); dsolve0(y(p_,x_)^m_+b_,y_):= if(hasnot(b,y), block(f:=int((-b)^(1/m),x,p)+gsolution(0,y,x,p), if(iseven(m), -f and f,f)), dsolve((-b)^(1/m),y,x,p) ); dsolve0(a_*y(p_,x_)^m_+b_,y_):= if(hasnot(a,b,y), block(f:=int((-b/a)^(1/m),x,p)+gsolution(0,y,x,p), if(iseven(m), -f and f,f)), dsolve((-b/a)^(1/m),y,x,p) ); dsolve0(y(p_,x_)^m_+b_*y(p_,x_)+cc_,y_):=if(hasnot(b,y),int(solve(y^m+b*y+cc,y),x,p)); #dsolve0(y(p_,x_)^2+b_*y(p_,x_)+c_,y_):= if(hasnot(b,c,y),C_1-int(b/2+sqrt(b*b/4-c),x,p) and C_1+int(-b/2+sqrt(b*b/4-c),x,p), expand(dsolve(-b/2-(b*b/4-c)^0.5,y,x,p)) ); dsolve0(a_=b_,y_):=dsolve0(replace(toy(a-b),y(x),y),y); dsolve0(a_):=dsolve0(replace(toy(a),y(x),y),y);