# Why does mathematica not display the graph?

I want to substitute the solution of a differential equation into a function, and plot the function. My code is as attached:

teta=NDSolveValue[{θ''[t] == (m l (g -i (θ'[t])^2 Cos[θ[t]]) (Sin[θ[t]] - μk Cos[θ[t]]))/(i +m l^2 Sin[θ[t]](Sin[θ[t]] - μk Cos[θ[t]]))
, θ[0] == π/2, θ'[0] == 0} /. {m -> 0.03517,l -> 0.0279,g -> 9.81,i -> 10.^-3 ,μk -> 0.1827}, θ , {t, 0, 5}]

F[t] =={ m l (θ''[t] Cos[θ[t]] - θ[t]'^2 Sin[θ[t]])} /. θ[t] -> teta//Simplify



The code works until here. When I try to plot F[t], mathematica only displays the axes but not the graph itself. Please send help. Thank you.

• In F[t], l, m and (\[Theta]^\[Prime]\[Prime])[t] are undefined. Also, F[t] = ... not F[t] == .... Commented Nov 12, 2020 at 2:05
• If i use F[t]= instead, would I be able to plot the graph? Commented Nov 12, 2020 at 2:10
• Also need to define l, m, and θ''[t] in the definition of F. Commented Nov 12, 2020 at 2:16
• Why do I have to define θ''[t]? Commented Nov 12, 2020 at 2:32

Clear["Global*"]

teta = NDSolve[{θ''[t] == (m l (g -
i (θ'[t])^2 Cos[θ[t]]) (Sin[θ[t]] - μk Cos[θ[t]]))/(i +
m l^2 Sin[θ[t]] (Sin[θ[t]] - μk Cos[θ[t]])), θ[0] == π/
2, θ'[0] == 0} /. {m -> 0.03517, l -> 0.0279,
g -> 9.81, i -> 10^-3, μk -> 0.1827}, θ, {t, 0, 5}][[1]];

F[t_] := m l (θ''[t] Cos[θ[t]] - θ'[t]^2 Sin[θ[
t]]) /. {m -> 0.03517, l -> 0.0279} /. teta

Plot[F[t], {t, 0, 5}]
`