'maxima: trying to minimize oscillator problem

display2d:false$
l:1$
g:9.80665$
ampl:1$
x(t):=ampl*sin(omega*t)$
eq:''(diff(x(t), t, 2)+g/l*sin(x(t)))$
assume(omega > 0)$
TIME:2*%pi/omega$
d:''(integrate(eq*eq, t, 0, TIME));
e:''(diff(d, omega));
solve(e, omega);

The integration already fails to yield something. What am I doing wrong? I'm still very uncertain about syntax....



Solution 1:[1]

The solution to this problem is creating a Taylor series out of the square, which in turn can easily be integrated.

display2d:false$
l:1$
g:9.80665$
ampl:0.001$
TIME:2*%pi/omega$
x(t):=ampl*sin(omega*t)$
eq:''(diff(x(t), t, 2)+g/l*sin(x(t)))$
eq*eq$
taylor(%, t, 0, 10)$
integrate(%, t, 0, TIME)$
diff(%, omega)$
solve(%, omega)$
float(%)$

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Frank