计算单摆摆动幅度达到最大值时,对应的时间,单摆的运动周期

img

是第一问还是第二问啊?第一问没有符号解,只能数值解

g = 10; L = 1;
theta0 = 30*pi/180;%30°
odefun = @(t,theta) [theta(2); -g/L*sin(theta(1))];
[t,theta] = ode45(odefun, [0,10], [theta0, 0]);
plot(t,theta(:,1))

img

这个周期是
2.007
第二问周期是2*pi*sqrt(L/g)