Hello there! I'm stuck at how to calculate the period of a function in Mathematica.
y[t] and m[t] are functions I made from different differential equations, and they should be periodic function. But I am not sure how to get the period. Also, I want to know how to compute x intercepts of my graphs, as in that way I can calculate the period as well.
Thank you so much.
edit: this is my code.
g = 9.81
L = 0.5
y =.
m =.
y = First[
y /. NDSolve[{y''[t] == -(g/L)*Sin[y[t]], y[0] == Pi/2, y'[0] == 0},
y, {t, 0, 10}]]
m = First[
m /. NDSolve[{m''[t] == -(g/L)*m[t], m[0] == Pi/2, m'[0] == 0},
m, {t, 0, 10}]]
Plot[{m[t], y[t]}, {t, 0, 10}, PlotLegends -> "Expressions",]
FunctionPeriod[{m[t], y[t]}, {t, 0, 10}]