From: nijso b. <ni...@ho...> - 2014-04-12 21:56:36
|
I have updated kovacicODE.mac to fix the problem with abs(). It now runs the problem below without specifying anything for a,b,c you can get kovacicODE from here: https://github.com/bigfooted/maxima-odesolve (%i1) load(kovacicODE); (%o1) /usr/local/share/maxima/5.33.0/share/contrib/maxima-odesolve/kovacicODE.mac (%i2) ode:b*x+a*'diff(y,x)+'diff(y,x,2) = c; 2 d y dy (%o2) --- + a -- + b x = c 2 dx dx (%i3) kovacicODE(ode,y,x); 'diff(y,x,2) = -a*'diff(y,x,1)-b*x+c$ -_w-abs(a)/2$ [y = %k1*%e^-(a*x)-(a^2*(b*x^2-2*c*x)+a*(2*c-2*b*x)+2*b)/(2*a^3)+%k2]$ 2 2 - a x a (b x - 2 c x) + a (2 c - 2 b x) + 2 b (%o3) [y = %k1 %e - ----------------------------------------- +%k2] 3 2 a This is the correct solution, but it could be further simplified by recognizing that if y(x) is a solution, then so is y(x)+C, so we could remove the constants a*2*c/(2*a^3) and 2*b/(2*a^3) from the nonhomogeneous part. Additionally kovacicODE tries to solve kamke problem 2.78 from the testsuite as well (it contains f(x) and f'(x)), but I still have to check the actual solution. |