Numerical Integration of Equations of Motion

List dependent variables

dvars={phi};

Write equations of motion

eom={phi''[t]==(a w^2/l) Cos[phi[t] - w t] - (g/l)Sin[phi[t]]};

Define all parameters

pars={a->1,l->2,w->10,g->9.8};
tmax=2;

Add some initial condisions

incon={phi[0]==0,phi'[0]==0};

Solve with NDSolve

sol=NDSolve[{eom,incon}//.pars,dvars,{t,0,tmax}]

Plot the solution

Plot[Evaluate[phi[t]/.sol],{t,0,tmax}]

or plot in some other coordinates

xy={x->a Cos[w t] + l Sin[phi[t]],y->-a Sin[w t] + l Cos[phi[t]]};
Plot[Evaluate[{x,y}/.xy/.pars/.sol],{t,0,tmax}]
ParametricPlot[Evaluate[{x,-y}/.xy/.pars/.sol],{t,0,tmax}]

Try again, with different parameters and initial conditions

pars={a->1,l->2,w->0.3,g->9.8};
tmax=4 π/w/.pars;
incon={phi[0]==0.1,phi'[0]==0};
sol=NDSolve[{eom,incon}//.pars,dvars,{t,0,tmax}];
Plot[Evaluate[phi[t]/.sol],{t,0,tmax}]
ParametricPlot[{Evaluate[{w t/(2 π),x}/.xy/.pars/.sol],Evaluate[{w t/(2 π),y}/.xy/.pars/.sol]},{t,0,tmax}]
ParametricPlot[Evaluate[{x,-y}/.xy/.pars/.sol],{t,0,tmax}]