function inversion



Maxima is a pretty good rapid-prototyping environment and includes much
useful infrastructure, so I'd think you could code this up much faster in
Maxima than in C++ -- at least once you're familiar with Maxima.  You could
certainly manipulate a list of intervals easily enough.

If you know that f is monotonic, then once you find the breakpoints, you can
do piecewise inversion easily enough.  No time now to elaborate, sorry.

           -s

On Thu, Feb 17, 2011 at 16:08, Stefan Veeser <stefanveeser at gmx.net> wrote:

>  thanks - at least I had the right approach as I meant solve, which is the
> solution you suggest, when I said simplify. I wonder whether there is a way
> to just work with sets of points, I.e. are there ways of having lists of
> pairs of values, swapping the elements in the pairs, and given two lists of
> pairs, form a new list of pairs, which merges the pairs from the two lists,
> for example simulating the addition of two functions by matching pairs with
> the same x value and add the two y values as the new y value...
> Not sure whether that makes sense to you, probably a shot in the dark. I
> was just hoping to get a quick answer I have about a certain problem, a
> system which could invert, add and otherwise manipulate functions would be
> very useful to me. I was hoping maxima would do that quicker than me having
> to program it all out in C++.
>
> thanks,
>
> Stefan
>
>
>  *From:* Stavros Macrakis <macrakis at alum.mit.edu>
> *Sent:* Thursday, February 17, 2011 7:23 PM
> *To:* Stefan Veeser <stefanveeser at gmx.net>
> *Cc:* maxima at math.utexas.edu
> *Subject:* Re: [Maxima] function inversion
>
> The general way to invert a function is solve, e.g.
>
>        ex: x^2 + x$
>        solve(ex = y, x);
>            =>  [x = -(sqrt(4*y+1)+1)/2,x = (sqrt(4*y+1)-1)/2]
>
> However, for more than two points, linearinterpol returns a result
> involving charfun2, which Maxima's solve function doesn't know how to deal
> with.  In general, Maxima is rather weak in dealing with piecewise-defined
> functions.
>
> Not sure what your intention is with 'simplify' and 'funcsimplify' -- as
> far as I know Maxima doesn't have functions by those names.  Maxima performs
> basic simplifications without any special command, e.g. 2*x/4 => x/2.  Other
> useful transformations, like (x-1)/(x^2-1) => 1/(x+1) (ratsimp) or 1/(x^2-1)
> => 1/2*(1/(x-1)-1/(x+1)) (1/2*multthru( partfrac(expr,x) / (1/2)) require
> more explicit commands.
>
>               -s
>
> On Thu, Feb 17, 2011 at 12:45, Stefan Veeser <stefanveeser at gmx.net> wrote:
>
>> Hi,
>>
>> I defined a function giving a set of points with linearinterpol then I
>> added another function, which I defined with a simple formula. The resulting
>> function is still strictly rising in value, so mathematically it can be
>> inverted, so I wanted to invert the function, but I could not find an
>> operator for that anywere, I tried
>>
>> simplify([y=f(x)],x), which produced some expression, but not what I
>> needed and funcsimplify([y=f(x(y)),x(y)), which failed (division by zero).
>>
>> Is there a standard way to do this ? it seems something pretty basic.
>>
>> for any help I would be very grateful,
>>
>> Stefan
>>
>>
>> _______________________________________________
>> Maxima mailing list
>> Maxima at math.utexas.edu
>> http://www.math.utexas.edu/mailman/listinfo/maxima
>>
>
>