Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Finding inverse of non-linear transformation

111 views
Skip to first unread message

Christopher O. Young

unread,
Feb 13, 2011, 5:50:49 AM2/13/11
to
I'm trying to find the inverse of the simple non-linear transformation

(a x + b x + c) ({
{x},
{y}})

I'm trying to use this as a sort of counter-example to the usual projective
transformation, which has the polynomial in the denominator. Does
Mathematica have a way to do this? InverseFunction doesn't seem to work
here.

In[1]:= F[x_, y_, a, b, c] := (a x + b x + c) ( { {x}, {y} } )

In[2]:= InverseFunction[[x_, y_, a, b, c]]

During evaluation of In[2]:= Part::pspec: Part specification x_ is neither
an integer nor a list of integers. >>

Out[2]= InverseFunction[[x_, y_, a, b, c]]


Any help very much appreciated.


Chris Young
cy...@comcast.net


Sjoerd C. de Vries

unread,
Feb 14, 2011, 4:26:31 AM2/14/11
to
Chris,

A few remarks:

1. Your definition of the function F is a bit weird. Not using Blanks
for a, b, and c, means the function will only be defined if you use
precisely these variable names. Values as arguments can't be used.
2. InverseFunction is *not* used to *calculate* the inverse function
of a given function, but is used by Mathematica to *represent* inverse
functions that emerge in its calculations. Read the InverseFunction
doc page for more details.
3. If you have a function f[x_] = ... then the inverse function can
(sometimes and not always correctly because of non-unique inverses) be
found by Solve[f[x]==fx,{x}] with fx a known result of f[x]. If you
have a function of more variables f[x_,y_] = ..., then you have to
solve two equations: Solve[{f[x,y]==fxy1, f[x,y]==fxy2},{x,y}] and
hope for the best. Quite often you won't be able to find a solution.
4. You have to modify 3. to accommodate the 2x1 matrix you're using
in the function definition, as the function now has two outputs
instead of one.

Cheers -- Sjoerd


On Feb 13, 11:50 am, "Christopher O. Young" <c...@comcast.net> wrote:
> I'm trying to find the inverse of the simple non-linear transformation
>
> (a x + b x + c) ({
> {x},
> {y}})
>
> I'm trying to use this as a sort of counter-example to the usual projective
> transformation, which has the polynomial in the denominator. Does
> Mathematica have a way to do this? InverseFunction doesn't seem to work
> here.
>

> In[1]:= F[x_, y_, a, b, c] := (a x + b x + c) ( { {x}, {y} }=


)
>
> In[2]:= InverseFunction[[x_, y_, a, b, c]]
>
> During evaluation of In[2]:= Part::pspec: Part specification x_ is neither
> an integer nor a list of integers. >>
>
> Out[2]= InverseFunction[[x_, y_, a, b, c]]
>
> Any help very much appreciated.
>
> Chris Young

> c...@comcast.net


Christopher O. Young

unread,
Feb 14, 2011, 4:27:45 AM2/14/11
to
On 2/13/11 5:50 AM, in article ij8d29$396$1...@smc.vnet.net, "Christopher O.
Young" <cy...@comcast.net> wrote:

> I'm trying to find the inverse of the simple non-linear transformation
>
> (a x + b x + c) ({
> {x},
> {y}})
> >
> I'm trying to use this as a sort of counter-example to the usual projective
> transformation, which has the polynomial in the denominator. Does
> Mathematica have a way to do this? InverseFunction doesn't seem to work
> here.
>
> In[1]:= F[x_, y_, a, b, c] := (a x + b x + c) ( { {x}, {y} } )
>
> In[2]:= InverseFunction[[x_, y_, a, b, c]]
>
>>
> During evaluation of In[2]:= Part::pspec: Part specification x_ is neither
> an integer nor a list of integers. >>
>
>
>
> Out[2]= InverseFunction[[x_, y_, a, b, c]]
>

I didn't have underscores for the a, b, and c the way I should have, but
that wasn't the main problem. InverseFunction doesn't seem designed to find
the inverse of vector transformations.


But I think using "Solve" with added variables on the other sides of the
equations gets me the result I'm looking for:

Solve[{
(a x + b x + c) x == X,
(a x + b x + c) y == Y
},
{x, y}
]


{{y -> (-((c Y)/(a + b)) - (Sqrt[c^2 + 4 a X + 4 b X] Y)/(a + b))/(
2 X),
x -> (-c - Sqrt[c^2 + 4 a X + 4 b X])/(
2 (a + b))}, {y -> (-((c Y)/(a +
b)) + (
Sqrt[c^2 + 4 a X + 4 b X] Y)/(a + b))/(2 X),
x -> (-c +
Sqrt[c^2 + 4 a X + 4 b X])/(2 (a + b))}}


0 new messages