Sander is right, it’s better to go with numerical solution here. Closed analytic form exist in terms of elliptic functions, but the problem is finding constants of integration from initial conditions. This needs solution of a system of nonlinear equations, which is not always possible.
sol = DSolve[y''[t] == -(g/l) Sin[y[t]], y, t];
y /. sol // Column // TraditionalForm
@Julian, if what you need is just a case with small excitation at the equilibrium, you can simply use the y instead of Sin[y]. For small y, the Taylor expansion gives you an approximation at the first order in a small neighbourhood of x=0:
I have a two questions regarding both approach and syntax. First, why can’t we obtain a numerical solution to the differential equation by using only the command, ‘NDSolve’ ? Second, what does the syntax below accomplish (i.e., y = .)?
y =.
y = First[ y /. NDSolve[{y’‘[t] == -(g/L)*Sin[y[t]], y[0] ==Pi/2, y’[0] == 0}, y, {t, 0, 10}]]