Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Resolve a function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg89720] Re: Resolve a function
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Thu, 19 Jun 2008 05:41:10 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, UK
  • References: <g3agrf$pm7$1@smc.vnet.net>

maria wrote:

> I am new with mathematica. I would be grateful if someone could tell
> me how can I find  the general solutions of the r for the following
> function f(r_) = 14.4* ((2/Sqrt[r^2 + R^2]) - 1/r )  (where
> R=constant). I just want to express the function as r =.....*f. Is
> this possible with mathematica.

Several Mathematics built-in functions are able to solve this kind of 
problem. If you are looking for symbolic answers, you should use 
*Reduce*, which gives you the most control over assumptions and 
constrains, and returns an exhaustive set of solutions. In the example 
below, we first make all coefficients exact numbers thanks to the 
*Rationalize* function, and force Reduce to search for real solutions only.

     Reduce[
      Rationalize[14.4*((2/Sqrt[r^2 + R^2]) - 1/r)] == f, r, Reals]

Note that the solutions returned by Reduce[] are expressed as boolean 
expressions (&& AND || OR) and that *Root* objects are exact 
representation of algebraic numbers. (Search the online documentation do 
get more details on each of these functions.)

(f < 0 &&
       ((R < -Sqrt[Root[-3761479876608 + 90699264000*f^2*#1 -
                         29160000*f^4*#1^2 + 15625*f^6*#1^3 & ,
            1]] &&

        r == Root[
          5184*R^2 + 720*f*R^2*#1 + (-15552 + 25*f^2*R^2)*#1^2 +
                     720*f*#1^3 + 25*f^2*#1^4 & , 1]) ||
          (Inequality[-Sqrt[
           Root[-3761479876608 + 90699264000*f^2*#1 -
                         29160000*f^4*#1^2 + 15625*f^6*#1^3 & , 1]],
         LessEqual, R,
               Less, 0] && r == Root[5184*R^2 + 720*f*R^2*#1 +
                     (-15552 + 25*f^2*R^2)*#1^2 + 720*f*#1^3 +
            25*f^2*#1^4 & ,
                 3]) || (Inequality[0, Less, R, LessEqual,
               Sqrt[Root[-3761479876608 + 90699264000*f^2*#1 -
                       29160000*f^4*#1^2 + 15625*f^6*#1^3 & , 1]]] &&

        r == Root[
          5184*R^2 + 720*f*R^2*#1 + (-15552 + 25*f^2*R^2)*#1^2 +
                     720*f*#1^3 + 25*f^2*#1^4 & , 3]) ||
          (R > Sqrt[Root[-3761479876608 + 90699264000*f^2*#1 -
                       29160000*f^4*#1^2 + 15625*f^6*#1^3 & , 1]] &&

        r == Root[
          5184*R^2 + 720*f*R^2*#1 + (-15552 + 25*f^2*R^2)*#1^2 +
                     720*f*#1^3 + 25*f^2*#1^4 & , 1]))) ||
    (f == 0 && ((R < 0 && r == Sqrt[R^2]/Sqrt[3]) ||
          (R > 0 && r == Sqrt[R^2]/Sqrt[3]))) ||
    (f > 0 &&
       ((R < -Sqrt[Root[-3761479876608 + 90699264000*f^2*#1 -
                         29160000*f^4*#1^2 + 15625*f^6*#1^3 & ,
            1]] &&

        r == Root[
          5184*R^2 + 720*f*R^2*#1 + (-15552 + 25*f^2*R^2)*#1^2 +
                     720*f*#1^3 + 25*f^2*#1^4 & , 1]) ||
          (R == -Sqrt[Root[-3761479876608 + 90699264000*f^2*#1 -
                         29160000*f^4*#1^2 + 15625*f^6*#1^3 & ,
            1]] &&
             (r ==
           Root[5184*R^2 +
              720*f*R^2*#1 + (-15552 + 25*f^2*R^2)*#1^2 +
                        720*f*#1^3 + 25*f^2*#1^4 & , 1] ||

          r == Root[
            5184*R^2 + 720*f*R^2*#1 + (-15552 + 25*f^2*R^2)*#1^2 +
                        720*f*#1^3 + 25*f^2*#1^4 & , 3])) ||
          (-Sqrt[Root[-3761479876608 + 90699264000*f^2*#1 -
                         29160000*f^4*#1^2 + 15625*f^6*#1^3 & , 1]] <
         R < 0 &&
             (r ==
           Root[5184*R^2 +
              720*f*R^2*#1 + (-15552 + 25*f^2*R^2)*#1^2 +
                        720*f*#1^3 + 25*f^2*#1^4 & , 1] ||

          r == Root[
            5184*R^2 + 720*f*R^2*#1 + (-15552 + 25*f^2*R^2)*#1^2 +
                        720*f*#1^3 + 25*f^2*#1^4 & , 3] ||

          r == Root[
            5184*R^2 + 720*f*R^2*#1 + (-15552 + 25*f^2*R^2)*#1^2 +
                        720*f*#1^3 + 25*f^2*#1^4 & , 4])) ||
          (R ==
         0 && (r == Root[-15552*#1^2 + 720*f*#1^3 + 25*f^2*#1^4 & ,
                    1] ||
          r == Root[-15552*#1^2 + 720*f*#1^3 + 25*f^2*#1^4 & ,
                    4])) || (0 < R <
         Sqrt[Root[-3761479876608 + 90699264000*f^2*#1 -
                       29160000*f^4*#1^2 + 15625*f^6*#1^3 & , 1]] &&
             (r ==
           Root[5184*R^2 +
              720*f*R^2*#1 + (-15552 + 25*f^2*R^2)*#1^2 +
                        720*f*#1^3 + 25*f^2*#1^4 & , 1] ||

          r == Root[
            5184*R^2 + 720*f*R^2*#1 + (-15552 + 25*f^2*R^2)*#1^2 +
                        720*f*#1^3 + 25*f^2*#1^4 & , 3] ||

          r == Root[
            5184*R^2 + 720*f*R^2*#1 + (-15552 + 25*f^2*R^2)*#1^2 +
                        720*f*#1^3 + 25*f^2*#1^4 & , 4])) ||
          (R == Sqrt[Root[-3761479876608 + 90699264000*f^2*#1 -
                       29160000*f^4*#1^2 + 15625*f^6*#1^3 & , 1]] &&
             (r ==
           Root[5184*R^2 +
              720*f*R^2*#1 + (-15552 + 25*f^2*R^2)*#1^2 +
                        720*f*#1^3 + 25*f^2*#1^4 & , 1] ||

          r == Root[
            5184*R^2 + 720*f*R^2*#1 + (-15552 + 25*f^2*R^2)*#1^2 +
                        720*f*#1^3 + 25*f^2*#1^4 & , 3])) ||
          (R > Sqrt[Root[-3761479876608 + 90699264000*f^2*#1 -
                       29160000*f^4*#1^2 + 15625*f^6*#1^3 & , 1]] &&

        r == Root[
          5184*R^2 + 720*f*R^2*#1 + (-15552 + 25*f^2*R^2)*#1^2 +
                     720*f*#1^3 + 25*f^2*#1^4 & , 1])))

Regards,
-- Jean-Marc


  • Prev by Date: Re: Combining pure functions to produce a new pure function
  • Next by Date: Re: Footnote numbers
  • Previous by thread: Re: Resolve a function
  • Next by thread: TabView control location