I use this
Clear["Global`*"]
sigma[t] = theta[t] - lambda[t];
sigmaF[t] = thetaF[t] - lambda[t];
rule1 = {Derivative[1][r][t] -> (-vm*Cos@(sigma[t])),
Derivative[1][lambda][t] -> -(vm*Sin@(sigma[t]))/(r[t]),
Derivative[1][thetaF][t] -> 0};
rule2 = {sigmat -> \[Sigma], sigmaft -> Subscript[\[Sigma], f],
vm -> Subscript[V, m], Derivative[1][theta][t] ->
\!\(\*OverscriptBox[\(\[Theta]\), \(.\)]\)};
tgo = r[t]/
vm*(1 + ((n + 2)*
sigma[t]^2 + (n + 1)^2*(n + 2) sigmaF[t]^2)/(2*(2 n +
3)*(2 n + 5)) - (n + 1)*sigma[t]*
sigmaF[t]/(2*(2*n + 3)*(2*n + 5)));
dtgo = ((D[tgo, t] /. rule1) //
FullSimplify) /. {(lambda[t] - theta[t]) ->
sigmat, (lambda[t] - thetaF[t]) -> sigmaft};
dtgo /. rule2 //
Collect[#, {Subscript[V, m], Cos[\[Sigma]], Sin[\[Sigma]],
\!\(\*OverscriptBox[\(\[Theta]\), \(.\)]\), r[t]}] &
answer is
$$ \begin{aligned} &-\cos \sigma \cdot\left(1+\frac{(n+2) \sigma^{2}+(n+1)^{2}(n+2) \sigma_{f}^{2}}{2(2 n+3)(2 n+5)}-\frac{(n+1) \sigma \sigma_{f}}{2(2 n+3)(2 n+5)}\right) \\ &+\frac{R}{2(2 n+3)(2 n+5) V_{\mathrm{M}}}\left[(2 n+4) \sigma-(n+1) \sigma_{\mathrm{f}}\right] \dot{\theta} \\ &+\frac{1}{2(2 n+3)(2 n+5)}\left[(2 n+3) \sigma+\left(2 n^{2}+6 n+3\right)_{\sigma_{f}}\right] \sin \sigma \end{aligned} $$
use wolfram get this:
By comparing the output with the original answer, you can see some differences
the $\sigma_f$ not collect
There are other problems
and
I've listed some of them here, not all of them, but anyway, I want wolfram's output to be exactly the same as the answer
y–x
as–x+y
, because it orders the variables alphabetically. You can fix this, and there are posts that address this, but it can be a lot of work if the formatting you want doesn't correspond to Mathematica's built-in functions $\endgroup$