Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #7845 > unrolled thread

InverseFunction: how to manage?

Started by"Dr. Wolfgang Hintze" <weh@snafu.de>
First post2012-01-14 22:23 +0000
Last post2012-01-16 12:00 +0000
Articles 2 — 2 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  InverseFunction: how to manage? "Dr. Wolfgang Hintze" <weh@snafu.de> - 2012-01-14 22:23 +0000
    Re: InverseFunction: how to manage? Peter Breitfeld <phbrf@t-online.de> - 2012-01-16 12:00 +0000

#7845 — InverseFunction: how to manage?

From"Dr. Wolfgang Hintze" <weh@snafu.de>
Date2012-01-14 22:23 +0000
SubjectInverseFunction: how to manage?
Message-ID<jesv8m$cp0$1@smc.vnet.net>
I apologize for asking this very elementary question but how do I 
manage InverseFunction?

Here is an example

When I solve the equation of motion for a pendulum

    f''[t] == Cos[f[t]], f[0]== 0, f'[0] == 0

I get (with paper and pencil) the time t as a function of the angle f 
thus

    t[f_] = Integrate[1/Sqrt[Sin[u]], {u, 0, f}]
    Out[22]=
    2*(EllipticF[f/2 - Pi/4, 2] + EllipticF[Pi/4, 2])

Now I want the the angle as a function of time (f[t]) like this

    "f[t_] = InverseFunction[t[f]]"

But this does not work. I also tried to define t as a pure function

t = 2*(EllipticF[#1/2 - Pi/4, 2] + EllipticF[Pi/4, 2]) &

but again, I have not seen a way to invert this, and for instance carry 
out Plot[f,{t,0,2 Pi}].

Thanks in advance for any hints.

Best regards,
Wolfgang



[toc] | [next] | [standalone]


#7880

FromPeter Breitfeld <phbrf@t-online.de>
Date2012-01-16 12:00 +0000
Message-ID<jf13hh$5l4$1@smc.vnet.net>
In reply to#7845
I think, you have to use InverseFunction[t] not InverseFunction[f[f]]
eg. like this:

In[33]:= t[f_] := 
 2 (EllipticF[f/2 - \[Pi]/4, 2] + EllipticF[\[Pi]/4, 2])

In[34]:= angle[time_] = InverseFunction[t][time]

During evaluation of In[34]:=
InverseFunction::ifun: Inverse functions are being used.
Values may be lost for multivalued inverses. >>

Out[34]= 1/2 (\[Pi] - 
   4 JacobiAmplitude[1/2 (-time + 2 EllipticF[\[Pi]/4, 2]), 2])

In[35]:= angle[1]

Out[35]= 1/2 (\[Pi] - 
   4 JacobiAmplitude[1/2 (-1 + 2 EllipticF[\[Pi]/4, 2]), 2])

In[39]:= angle[.25] // Chop

Out[39]= 0.0156249


"Dr. Wolfgang Hintze" wrote:

> I apologize for asking this very elementary question but how do I 
> manage InverseFunction?
>
> Here is an example
>
> When I solve the equation of motion for a pendulum
>
>     f''[t] == Cos[f[t]], f[0]== 0, f'[0] == 0
>
> I get (with paper and pencil) the time t as a function of the angle f 
> thus
>
>     t[f_] = Integrate[1/Sqrt[Sin[u]], {u, 0, f}]
>     Out[22]=
>     2*(EllipticF[f/2 - Pi/4, 2] + EllipticF[Pi/4, 2])
>
> Now I want the the angle as a function of time (f[t]) like this
>
>     "f[t_] = InverseFunction[t[f]]"
>
> But this does not work. I also tried to define t as a pure function
>
> t = 2*(EllipticF[#1/2 - Pi/4, 2] + EllipticF[Pi/4, 2]) &
>
> but again, I have not seen a way to invert this, and for instance carry 
> out Plot[f,{t,0,2 Pi}].
>
> Thanks in advance for any hints.
>
> Best regards,
> Wolfgang
>
>
>
>

-- 
_________________________________________________________________
Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web