Discussion:
Inverse function solution
(too old to reply)
Narasimham
2014-04-28 01:45:02 UTC
Permalink
Solve[ {x == Cos[u], y == Cos[u + v] }, {u, v} ]

Its closed/analytic solution is not possible, even numerically.

The known solutions are ellipses from sine waves with a phase difference, having x^2, x y and y^2 terms, as also sketched in Lissajous curves:

ParametricPlot[{Cos[u], Cos[u + v]}, {u, -Pi, Pi}, {v, -Pi, Pi}]

Can there be a work around?

Narasimham
Bob Hanlon
2014-04-29 05:32:24 UTC
Permalink
$Version


"9.0 for Mac OS X x86 (64-bit) (January 24, 2013)"


sol = Assuming[
{-1 <= x <= 1, -1 <= y <= 1, C[1] == 0, C[2] == 0},
Solve[{x == Cos[u], y == Cos[u + v]}, {u, v}] //
Simplify]


{{u -> ArcTan[x, -Sqrt[1 - x^2]],
v -> ArcTan[Sqrt[1 - x^2]*(x*y -
Sqrt[(-1 + x^2)*(-1 + y^2)]),
y - x^2*y + x*Sqrt[(-1 + x^2)*(-1 + y^2)]]},
{u -> ArcTan[x, -Sqrt[1 - x^2]],
v -> ArcTan[Sqrt[1 - x^2]*(x*y +
Sqrt[(-1 + x^2)*(-1 + y^2)]),
y - x^2*y - x*Sqrt[(-1 + x^2)*(-1 + y^2)]]},
{u -> ArcTan[x, Sqrt[1 - x^2]],
v -> ArcTan[x*y - Sqrt[(-1 + x^2)*(-1 + y^2)],
-((y - x^2*y + x*Sqrt[(-1 + x^2)*(-1 + y^2)])/
Sqrt[1 - x^2])]}, {u -> ArcTan[x, Sqrt[1 - x^2]],
v -> ArcTan[Sqrt[1 - x^2]*(x*y +
Sqrt[(-1 + x^2)*(-1 + y^2)]), (-1 + x^2)*y +
x*Sqrt[(-1 + x^2)*(-1 + y^2)]]}}



Bob Hanlon
Post by Narasimham
Solve[ {x == Cos[u], y == Cos[u + v] }, {u, v} ]
Its closed/analytic solution is not possible, even numerically.
The known solutions are ellipses from sine waves with a phase difference,
ParametricPlot[{Cos[u], Cos[u + v]}, {u, -Pi, Pi}, {v, -Pi, Pi}]
Can there be a work around?
Narasimham
Murray Eisenberg
2014-04-29 05:33:26 UTC
Permalink
In Mathematica 9.0.1, I'm getting:

Solve[{x == Cos[u], y == Cos[u + v]}, {u, v}, Reals]
{{u -> ConditionalExpression[-ArcCos[x] +
2 \[Pi] C[1], (C[1] | C[2]) \[Element] Integers && -1 <= x <=
1 && -1 <= y <= 1],
v -> ConditionalExpression[
ArcCos[x] - ArcCos[y] - 2 \[Pi] C[1] +
2 \[Pi] C[2], (C[1] | C[2]) \[Element] Integers && -1 <= x <=
1 && -1 <= y <= 1]}, {u ->
ConditionalExpression[-ArcCos[x] +
2 \[Pi] C[1], (C[1] | C[2]) \[Element] Integers && -1 <= x <=
1 && -1 <= y <= 1],
v -> ConditionalExpression[
ArcCos[x] + ArcCos[y] - 2 \[Pi] C[1] +
2 \[Pi] C[2], (C[1] | C[2]) \[Element] Integers && -1 <= x <=
1 && -1 <= y <= 1]}, {u ->
ConditionalExpression[
ArcCos[x] +
2 \[Pi] C[1], (C[1] | C[2]) \[Element] Integers && -1 <= x <=
1 && -1 <= y <= 1],
v -> ConditionalExpression[-ArcCos[x] - ArcCos[y] - 2 \[Pi] C[1] +
2 \[Pi] C[2], (C[1] | C[2]) \[Element] Integers && -1 <= x <=
1 && -1 <= y <= 1]}, {u ->
ConditionalExpression[
ArcCos[x] +
2 \[Pi] C[1], (C[1] | C[2]) \[Element] Integers && -1 <= x <=
1 && -1 <= y <= 1],
v -> ConditionalExpression[-ArcCos[x] + ArcCos[y] - 2 \[Pi] C[1] +
2 \[Pi] C[2], (C[1] | C[2]) \[Element] Integers && -1 <= x <=
1 && -1 <= y <= 1]}}

Or, a bit simpler:

Reduce[{x == Cos[u], y == Cos[u + v]}, {u, v}, Reals]
(C[1] | C[2]) \[Element] Integers && -1 <= x <= 1 && -1 <= y <=
1 && ((u == -ArcCos[x] +
2 \[Pi] C[1] && (v ==
ArcCos[x] - ArcCos[y] - 2 \[Pi] C[1] + 2 \[Pi] C[2] ||
v == ArcCos[x] + ArcCos[y] - 2 \[Pi] C[1] +
2 \[Pi] C[2])) || (u ==
ArcCos[x] +
2 \[Pi] C[1] && (v == -ArcCos[x] - ArcCos[y] - 2 \[Pi] C[1] +
2 \[Pi] C[2] ||
v == -ArcCos[x] + ArcCos[y] - 2 \[Pi] C[1] + 2 \[Pi] C[2])))
Post by Narasimham
Solve[ {x == Cos[u], y == Cos[u + v] }, {u, v} ]
Its closed/analytic solution is not possible, even numerically.
ParametricPlot[{Cos[u], Cos[u + v]}, {u, -Pi, Pi}, {v, -Pi, Pi}]
Can there be a work around?
Narasimham
Murray Eisenberg ***@math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower phone 240 246-7240 (H)
University of Massachusetts
710 North Pleasant Street
Amherst, MA 01003-9305
Roland Franzius
2014-04-29 05:32:45 UTC
Permalink
Post by Narasimham
Solve[ {x == Cos[u], y == Cos[u + v] }, {u, v} ]
Its closed/analytic solution is not possible, even numerically.
ParametricPlot[{Cos[u], Cos[u + v]}, {u, -Pi, Pi}, {v, -Pi, Pi}]
Can there be a work around?
Yes, replace trigonometric functions by rationals of exponentials.

{x == Cos[u], y == Cos[u + v]} // TrigExpand // TrigToExp

{x == E^(-I u)/2 + E^(I u)/2,
y == 1/2 E^(-I u - I v) + 1/2 E^(I u + I v)}

Solve[ {2 x == q + 1/q, 2 y == p q + 1/(p q)}, {q, p}]

q-> Exp[I u], p-> Exp[I v]
--
Roland Franzius
Alexei Boulbitch
2014-04-30 05:40:10 UTC
Permalink
Solve[ {x == Cos[u], y == Cos[u + v] }, {u, v} ]

Its closed/analytic solution is not possible, even numerically.

The known solutions are ellipses from sine waves with a phase difference, having x^2, x y and y^2 terms, as also sketched in Lissajous curves:

ParametricPlot[{Cos[u], Cos[u + v]}, {u, -Pi, Pi}, {v, -Pi, Pi}]

Can there be a work around?

Narasimham



Hi, Narasimham,

It can be solved numerically, though, since it is double-periodic it should be done carefully. This is a fast shot of how it can be done:

Here I put y=1 and vary only x:

lst = Table[{x,
FindRoot[{x == Cos[u],
1 == Cos[u + v]}, {{u, 0.1}, {v, 0.1}}] /. {x_ -> a_,
y_ -> b_} -> {a, b}}, {x, 0., 0.4, 0.05}]

This is the outcome:

{{0., {7.85398, -7.85398}}, {0.05, {7.80396, -7.80396}}, {0.1, \
{7.75381, -7.75381}}, {0.15, {7.70341, -7.70341}}, {0.2, {7.65262, \
-7.65262}}, {0.25, {7.6013, -7.6013}}, {0.3, {7.54929, -7.54929}}, \
{0.35, {7.49641, -7.49641}}, {0.4, {5.12391, -5.12391}}}

Let us check, if it is right:

lst /. {x_, {y_, z_}} -> {x == Cos[y], 1 == Cos[y + z]}

{{False, True}, {True, True}, {True, True}, {True, True}, {True,
True}, {True, True}, {True, True}, {True, True}, {True, True}}

So, the result is right except the one in the first parentheses. Let us plot it. Try this:

ListPlot[{lst /. {x_, {y_, z_}} -> {x, y},
lst /. {x_, {y_, z_}} -> {x, z}}]

Have fun, Alexei


Alexei BOULBITCH, Dr., habil.
IEE S.A.
ZAE Weiergewan,
11, rue Edmond Reuter,
L-5326 Contern, LUXEMBOURG

Office phone : +352-2454-2566
Office fax: +352-2454-3566
mobile phone: +49 151 52 40 66 44

e-mail: ***@iee.lu

Loading...