On Sep 28, 12:49 pm, Minh Nguyen <[email protected]> wrote:
> Hi,
>
> On Thu, Sep 29, 2011 at 2:17 AM, globaljavaprogrammer
>
> <[email protected]> wrote:
> > how can I use sage to compute the inverse of a function like f(x) = (x
> > +1)^2?
>
> sage: f = (x + 1)^2
But assuming he meant the function inverse, not the multiplicative
inverse...
This is in general a very hard problem, of course. But one can do
some cases.
Yours:
sage: f = (x+1)^2
sage: var('y')
y
sage: solve(f==y,x)
[x == -sqrt(y) - 1, x == sqrt(y) - 1]
or others:
sage: h = 2^(x+5)
sage: solve(h==y,x)
[x == -(5*log(2) - log(y))/log(2)]
But we don't give the elliptic function inverses to crazy things.
sage: g = x^5+x+1
sage: solve(g==y,x)
[0 == x^5 + x - y + 1]
The underlying functionality for this is provided by Maxima. So if
they can't solve it, we can't either.
- kcrisman
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org