kill(all)$

Newton law  'second law ',equation of motion 2D.  'version 1.0'
peter.vlasschaert@gmail.com, 09/06/2018

Second Law : Newton  :  vec(F)= m*vec(a)
F  = 'force'              , units 'N ' ,newton
m = 'mass'             , units 'Kg', mass
a = 'acceleration'  ,units 'm/s^2,acceleration

N = Kg*m/s^2
rem : s=second  (= time ), m = meter (= distance)
2D : vec(F) = [Fx,Fy] , Fx ,Fy = Force             components x,y direction
2D  :vec(a) =[ax,ay],    ax , ay =Acceleration components x,y direction

vec(F) ,vec(a)  ? 

F:[Fx,Fy];
a:[ax,ay];

components 'F' ,Fx,Fy.

p1:F[1];
p2:F[2];

components 'a' ,ax,ay.

p3:a[1];
p4:a[2];

rem : acceleration : [m/s]/[s] = velocity/time ' mathematics =dv/dt'
v = velocity ,t = time  
dv = small differences in velocity
dt  = small differences in time

define : vec(v)  , components  ?

v:[vx,vy];

p5:v[1];
p6:v[2];

rem :velocity        :[m/s]     = distance/time    'mathematics = ds/dt ' 
ds = small differences in distance  (dx,dy)
dt  = small differences in time
dv = small differences in velocity

depends([x,y],t);

rem : x=x(t),y=y(t)

depends([vx,vy],t);

rem : vx=vx(t),vy=vy(t)

depends([ax,ay],t);

rem : ax=ax(t),vy=ay(t)

relation : v=ds/dt  then  a=dv/dt = d(ds/dt)/dt  
1e)  v , first            derivative distance to time
2e)  a , second     derivative distance to time

1e)  v ?

p7: p5 = 'diff(x,t,1);
p8: p6 ='diff(y,t,1);

2e) a 

p9: p3 = 'diff(x,t,2);
p10:p4 ='diff(y,t,2);

second law . ' see above '  F =m*a

p11:p9*m;
p12:p10*m;

We have : 'Newton second law '  in differential form.

p13:p1=rhs(p11);
p14:p2 =rhs(p12);

rem : We can use also  'p11,p12' for Newton Second Law.

gravitational field : negative  ' y direction'  above x-axes.
a:[ax,ay]=[0,-g]
g = acceleration on earth ,approx = constant = -9.81 [m/s^2]

We can find relation , between 'p7,p8' and ' p9,p10'.
Answer ? : differentation  'p7,p8' with respect to time.

p15: diff(p7,t,1);
p16:diff(p8,t,1);

p17:rhs(p15)=lhs(p9);
p18:rhs(p16)=lhs(p10);

gravitation field a:[ax,ay] =[0,-g]

p19:ax=0;
p20:ay=-g;

into : 'p17,p18'

p21:subst([p19,p20],p17);
p22:subst([p19,p20],p18);

by default : %k1,%k2 , for a second order differential equations.
both : 'p21,p22'  => Maxima  ode2 => solve them  C1,C2 for 'p23' => use 'subst'
                                                                                            C3,C4 for 'p24' => use 'subst'

p23:subst([%k1=c1,%k2=c2],ode2(p21,x,t));
p24:subst([%k1=c3,%k2=c4],ode2(p22,y,t));

to find : intial position : given (x,y) =(x0,y0)
Answer ? :  by putting t=0 ,both equations find 'c1,c3'

p25:subst([t=0],rhs(p23))=x0;
p26:subst([t=0],rhs(p24))=y0;

p27:subst([p25],p23);
p28:subst([p26],p24);

to find : 'c2,c4' => v:[vx,vy]=[vx0,vy0]
Answer ? differentation 'p27,p28' with respect  to time.after (t=0).
rem : c2*t or c4.t = distance , 'c2,c4' must be initial velocities.

p29:rhs(diff(p27,t,1))=vx0;
p30:rhs(diff(p28,t,1))=vy0;

put 't=0' into 'p29,p30'

p31:subst([t=0],p29);
p32:subst([t=0],p30);

final result : equation motion 2D ,'with Newton Second Law'

How to insert 'p31,p32' into 'p27,p28'

p33:subst([p31],p27);
p34:subst([p32],p28);

rem : vx0 =vv0*cos(α)
           vy0 =vv0*sin(α)

projectile motion : 2D,when origin : [x0,y0]=[0,0]

p35:vx0=vv0*cos(α);
p36:vy0=vv0*sin(α);

result : projectile equation motion.(2D)

p37:subst([x0=0,p35],p33);
p38:subst([y0=0,p36],p34);

rem : 'p17,p18' equation not always be solved to closed form.
            How to solve : with numerical methods 'RK4' see website.