1
$\begingroup$

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

$\endgroup$
1
  • $\begingroup$ 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. $\endgroup$ Jan 6, 2019 at 13:24

3 Answers 3

1
$\begingroup$

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.

$\endgroup$
6
  • 3
    $\begingroup$ 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 $\endgroup$
    – Bob Hanlon
    Dec 7, 2018 at 2:16
  • $\begingroup$ @BobHanlon That's much more straightforward! Very good. $\endgroup$
    – JimB
    Dec 7, 2018 at 4:32
  • $\begingroup$ Sure that this is the solution? I think the curve parameter t should be eliminated! $\endgroup$ Dec 7, 2018 at 8:00
  • 1
    $\begingroup$ @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. $\endgroup$
    – JimB
    Dec 7, 2018 at 14:38
  • $\begingroup$ @JimB Thanks, perhaps the OP gives a feedback $\endgroup$ Dec 7, 2018 at 15:16
0
$\begingroup$

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]

$\endgroup$
0
$\begingroup$

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]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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