kill(all)$

maxima : D operator use "introduction",version 1.0
peter.vlasschaert@gmail.com,22/07/2022.

use : prefix,ode2,assume,psubst,solve,is.

Defining : D operator
----------------------------

step 1 : definition D operator.

D(f):= diff(f,x);

step 2: make the D operator.

prefix("D");

How to use : D operator
-------------------------------

→ D

D sin(x);

→ D^2

D(%);

D (D sin(x));

D y;

depends(y,x);

D y;

Dy;

you need specify the space : D operator :
Dy ≠ D y

relation : math & maxima
----------------------------------

differential equation : example "second order ode"
----------------------------------------------------------------
ode    = ordinary differential equations
order = highest order differential in the ode.
see : depends(y,x) , "see above"

p1: a2*D (D y)+a1*D y +a0* y =0;

math class : D (D y) = D^2, D (D (D y)) = D^3
result :
(a2*D^2+a1*D + a0)*y =0

solve : ode p1
-----------------

------------------------------------------------------------------
AI →  maxima : ?  4*a0*a2 - a1^2  (>,<,zero)
                          ?  zero : (a1 = 0) ,zero : (a1 ≠ 0)  
reason : you don't want get question ( use : assume)
------------------------------------------------------------------
AI = (a)rtificial (i)ntelligence

p2a:assume(4*a0*a2-a1^2>0);

p2:ode2(p1,y,x);

forget(p2a)$

p2b:assume(4*a0*a2-a1^2<0);

p3:ode2(p1,y,x);

forget(p2b)$

p2c:assume(equal(4*a0*a2,a1^2));

→ a1 = 0

p2c1:assume(equal(a1,0));

p4a:ode2(p1,y,x);

forget(p2c1);

→ a1 ≠ 0

p2c2:assume(notequal(a1,0));

p4b:ode2(p1,y,x);

rem : p1

p5: [(D [D y])[1]=m^2,D y = m,y=1];

p5a:psubst(p5,p1);/*quadratic equation "m"*/

→ don't forget [1]

p5b:solve(p5a,m);

p5c:[p5b[1],p5b[2]];/*lhs,rhs*/

is(p5b=p5c);

use : p5b also used in mathclass.

rem : see above "solve : ode p1: ?,? ". (info : solve quadratic eq.)
-----------------------------------------------------------------------------------
assume : equal,notequal,>,< "overall statement highest priority ,see 
programming "
-----------------------------------------------------------------------------------

other : not allowed here ( → D^2, (D^2),[D^2]),get a error.
reason : defining D operator

-----------------------------------------------------------------------------------