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].

New contributor
Muti Ur Rehman Khan is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

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.

  • 3
    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 at 2:16
  • @BobHanlon That's much more straightforward! Very good. – JimB Dec 7 at 4:32
  • Sure that this is the solution? I think the curve parameter t should be eliminated! – Ulrich Neumann Dec 7 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 at 14:38
  • @JimB Thanks, perhaps the OP gives a feedback – Ulrich Neumann Dec 7 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]

Your Answer

Muti Ur Rehman Khan is a new contributor. Be nice, and check out our Code of Conduct.

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.