# Solve with inverse trig functions (4-Bar Linkage)

    c = 5.; b = 3.; a = 2.; len = 7.5;
u[t_] := Reduce[
NSolve[(2 c + a Cos[t] - b Cos[u[t]])^2 + (a Sin[t] - b Sin[u[t]])^2 -
len^2 == 0], u, Reals]
Plot[u[t], {t, 0, 2 Pi}]


• You're not using NSolve properly - which variable are you solving for? Commented Jul 23, 2020 at 20:53
• Sorry, u[t] corrected typo Commented Jul 23, 2020 at 20:56
• NSolve[(2 c + a Cos[t] - b Cos[u[t]])^2 + (a Sin[t] - b Sin[u[t]])^2 - len^2 == 0] this still doesn't work. What variable are you solving for? Commented Jul 23, 2020 at 21:05
• You are defining a procedural function u[t_] using the expression u[t] symbolically in its definition. This is not a sensible use of recursion. What problem are you trying to solve, exactly? Commented Jul 23, 2020 at 21:10

You don't need Reduce , try Weirstrass substitution  u[t] -> 2 ArcTan[uu]:

Leaving the parameters undefined try

eq = TrigExpand[(2 c + a Cos[t] - b Cos[u[t]])^2 + (a Sin[t] -
b Sin[u[t]])^2 - len^2 == 0]
sol = 2 ArcTan[uu] /.Solve[eq /. u[t] -> 2 ArcTan[uu] // TrigExpand, uu]


which gives the two solution branches u[t] in analytical form. {2 ArcTan[(4 a b Sin[ t] - \[Sqrt](-4 (a^2 + b^2 - 4 b c + 4 c^2 - len^2 - 2 a b Cos[t] + 4 a c Cos[t]) (a^2 + b^2 + 4 b c + 4 c^2 - len^2 + 2 a b Cos[t] + 4 a c Cos[t]) + 16 a^2 b^2 Sin[t]^2))/(2 (a^2 + b^2 + 4 b c + 4 c^2 - len^2 + 2 a b Cos[t] + 4 a c Cos[t]))], 2 ArcTan[(4 a b Sin[ t] + \[Sqrt](-4 (a^2 + b^2 - 4 b c + 4 c^2 - len^2 - 2 a b Cos[t] + 4 a c Cos[t]) (a^2 + b^2 + 4 b c + 4 c^2 - len^2 + 2 a b Cos[t] + 4 a c Cos[t]) + 16 a^2 b^2 Sin[t]^2))/(2 (a^2 + b^2 + 4 b c + 4 c^2 - len^2 + 2 a b Cos[t] + 4 a c Cos[t]))]}

Plot[sol /. {c -> 5, b -> 3, a -> 2, len -> 15/2} //Evaluate, {t, 0, 2 Pi}]


tps://i.sstatic.net/dEkDP.png

Clear["Global*"]

c = 5; b = 3; a = 2; len = 15/2;

eqn = (2 c + a Cos[t] - b Cos[u])^2 + (a Sin[t] - b Sin[u])^2 -
len^2 == 0 // Simplify

(* 227/4 + 40 Cos[t] == 12 (Cos[t - u] + 5 Cos[u]) *)

sol = u /.
Assuming[0 <= t <= 2 Pi,
Solve[{eqn, 0 <= t < 2 Pi}, u, Reals, Method -> Reduce] //
Simplify] /. C[1] -> 0;

u1[t_] = sol[[1]]


u2[t_] = sol[[2]]


FunctionDomain[#[t], t] & /@ {u1, u2}


%[[1]] // N

3.14159 < t < 4.86928 || 1.4139 < t < 3.14159

Plot[{u1[t], u2[t]}, {t, 0, 2 Pi}, PlotPoints -> 100,
MaxRecursion -> 5, PlotLegends -> Placed[{u1, u2}, {0.85, 0.7}]]


For comparison,

ContourPlot[Evaluate@eqn,
{t, 0, 2 Pi}, {u, -1.35, 1.35},
AspectRatio -> 1/GoldenRatio]
`

• Thanks. How do we include the second solution ( with U looking up? ) Commented Jul 24, 2020 at 4:51
• See edit. You must define two functions since a function cannot be multivalued for any argument. Commented Jul 24, 2020 at 5:11