# Substituting solutions of a differential equation into another function

I have a rather complicated differential equation,
$$ddot theta=frac{ml(g-ldottheta^2 cos theta)(sintheta – mu_k costheta)}{I+ml^2sintheta(sintheta-mu_k cos theta)}$$ I have managed to solve this equation using DSolve. Now, I want to substitute the solution $$theta (t)$$ into another function:
$$F(t)=m(l(ddottheta cos theta-dottheta^2 sintheta))$$. However, I cannot do it.

The code is attached:

``````sol=DSolve((Theta)''(t)==(m l (g - (CapitalIota) ((Theta)'(t))^2 Cos((Theta)(t)))(Sin ((Theta)(t))-(Mu)k Cos((Theta)(t))))/((CapitalIota) + m l^2 Sin((Theta)(t))(Sin((Theta)(t))-(Mu)k Cos((Theta)(t)))), (Theta)(t), t)

Ak = sol((1))

j = sol((2))

DSolve ({F(t) ==m l ((Theta)''(t) Cos((Theta)(t))-(Theta)(t)'^2 Sin((Theta)(t)))}/.k,F(t),t)

DSolve ({F(t) ==m l ((Theta)''(t) Cos((Theta)(t))-(Theta)(t)'^2 Sin((Theta)(t)))}/.j,F(t),t)

DSolve({n(t)- m g==-m l((Theta)''(t)Sin((Theta)(t))+(Theta)'^2 Cos((Theta)(t))) }/.k, n(t), t)

DSolve({n(t)- m g==-m l((Theta)''(t) Sin((Theta)(t))+(Theta)'^2 Cos((Theta)(t))) }/.j, n(t), t)

m=0.03517;
l=0.0279;
g=9.81;
(CapitalIota)=10^-3;
(Mu)k=0.1827;
DEFricitonk = NDSolve({F(t) ==m l ((Theta)''(t) Cos((Theta)(t))-(Theta)(t)'^2 Sin((Theta)(t))), (Theta)(0)== (Pi)/2,(Theta)'(0)==0, F(0)==0}/.k,F,{t,0,5})

DEFrictionj= NDSolve({F(t) ==m l ((Theta)''(t) Cos((Theta)(t))-(Theta)(t)'^2 Sin((Theta)(t))), (Theta)(0)== (Pi)/2,(Theta)'(0)==0, F(0)==0}/.j,F,{t,0,5})

DENormalk= NDSolve({n(t)- m g==-m l((Theta)''(t)Sin((Theta)(t))+(Theta)'^2 Cos((Theta)(t))) , (Theta)(0)== (Pi)/2,(Theta)'(0)==0, F(0)==0}/.k,n,{t,0,5})

DENormalj= NDSolve({n(t)- m g==-m l((Theta)''(t)Sin((Theta)(t))+(Theta)'^2 Cos((Theta)(t))) , (Theta)(0)== (Pi)/2,(Theta)'(0)==0, F(0)==0}/.j,n,{t,0,5})
``````

Please send help. Thank you so much.