# Solving parametric equation

I am trying to solve these equations

t + (a*Sin[t/b - h] + a)*Tan[θ] == x

k + (a*Sin[t/b - h] + a) == y

where a, b, h, and θ are the coefficients.

I want the equation in the form of y[x].

• The variable t apearing inside and outside Sin[] in the expression for x dashes any hope of having a simple closed form for y[x]; this is similar to the situation with the cycloid. – J. M. is computer-less Jan 6 at 13:24

You could solve for a in the first equation and then substitute the result into the second equation:

sol = Solve[t + (a*Sin[t/b - h] + a)*Tan[θ] == x, a][[1]]
(* {a -> ((t - x) Cot[θ])/(-1 + Sin[h - t/b])} *)

FullSimplify[k + (a*Sin[t/b - h] + a) /. sol]
(* k + (-t + x) Cot[θ] *)

Or notice that (a*Sin[t/b - h] + a) is equal to -(t - x) Cot[θ] and substitute that into the second equation.

• Or in a single step Solve[{t + (a*Sin[t/b - h] + a)*Tan[θ] == x, k + (a*Sin[t/b - h] + a) == y}, y, {a}][[1]] // Simplify – Bob Hanlon Dec 7 '18 at 2:16
• @BobHanlon That's much more straightforward! Very good. – JimB Dec 7 '18 at 4:32
• Sure that this is the solution? I think the curve parameter t should be eliminated! – Ulrich Neumann Dec 7 '18 at 8:00
• @UlrichNeumann. Not sure. I'm a statistician and live by "Statistics means never having to say you're certain." I suppose the OP would need to clarify if $x$ and $y$ are parametric functions of $t$ and the rest are just arbitrary constants - although thinking about it, that does seem to be what is being asked as $t$ is not in the list of coefficients. – JimB Dec 7 '18 at 14:38
• @JimB Thanks, perhaps the OP gives a feedback – Ulrich Neumann Dec 7 '18 at 15:16

It seems only be possible to solve analytically for x[y] :

ergt = Solve[ k + (a*Sin[t/b - h] + a) == y ,  t ] /. C[1] -> 0(*restrict solution [0,2Pi]*)
(*{{t -> h - ArcSin[(a + k - y)/a]}, {t ->h - \[Pi] + ArcSin[(a + k - y)/a]}} *)

Now it is possible to solve for x[y] (2 solutions):

{Solve[t + (a*Sin[t/b - h] + a)*Tan[\[Theta]] == x /. ergt[[1]], x][[1]]
,
Solve[t + (a*Sin[t/b - h] + a)*Tan[\[Theta]] == x /. ergt[[2]],x][[1]]}
(*{{x -> h - ArcSin[(a + k - y)/a] - k Tan[\[Theta]] +y Tan[\[Theta]]},
{x ->h - \[Pi] + ArcSin[(a + k - y)/a] - k Tan[\[Theta]] +y Tan[\[Theta]]}}*)

If necessary, you could further use InverseFunction for given parametervalues a,b,h,k,\[Theta]

Solving first for $$t$$

solt = Solve[y == a (Sin[t/b - h] + 1) + k, t] /. {C[1] -> 0}

and then after substitution

x - t - a (Sin[t/b - h] + 1) Tan[theta] /. solt // FullSimplify

we get at the implicit forms $$(f(x,y(x))=0)$$

-b h + x + b ArcSin[(a + k - y)/a] + (k - y) Tan[theta] == 0

and

-b h + b Pi + x - b ArcSin[(a + k - y)/a] + (k - y) Tan[theta] = 0

Follows an example with numerical values.

a = 1; b = 1; h = 0 Pi/4; k = 1; theta = Pi/4;
gr1 = ContourPlot[-b h + x + b ArcSin[(a + k - y)/a] + (k - y) Tan[theta] == 0, {x, -4, 4}, {y, 0, 4}, ContourStyle -> {Thick, Blue}];
gr2 = ContourPlot[-b h + b \[Pi] + x - b ArcSin[(a + k - y)/a] + (k - y) Tan[theta] == 0, {x, -4, 4}, {y, 0, 4}, ContourStyle -> {Thick, Blue}];
Show[gr1, gr2]