cmath12.nb - Ordinary Differential Equations 
Systems of ODEs

Clear["Global`*"]

Ορισμός

deq1=x'[t]==y[t]-x[t]/2
deq2=y'[t]==-x[t]

General solution

command

sol=DSolve[{deq1,deq2},{x,y},t]

solution in user functions

xt=x[t]/.sol[[1]] //FullSimplify
yt=y[t]/.sol[[1]] //FullSimplify

Initial Value Problem

Solution

Clear[x0,y0]
sol=DSolve[{deq1,deq2,x[0]==x0,y[0]==y0},{x,y},t]; 
xt=x[t]/.sol[[1]] //FullSimplify
yt=y[t]/.sol[[1]] //FullSimplify

Time Evolution

x0=1; y0=0;
Plot[xt,{t,0,15}, PlotRange->All]
Plot[yt,{t,0,15}, PlotRange->All]

Trajectory in phase space

ParametricPlot[{xt,yt},{t,0,15}, PlotRange->All]