MathGroup Archive 2006

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

Search the Archive

Re: Closed Form solution too much to hope for?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg66746] Re: Closed Form solution too much to hope for?
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Sun, 28 May 2006 06:08:41 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, UK
  • References: <e5augm$no4$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

DOD wrote:
> I don't have a very good idea on the guts of  Solve, or what its
> reasonable to expect from mathematica, but here's what I want:  T is
> the solution to
> 
> d x^n + (1-d) x^2 == c
> 
> Where n, d and c are parameters of my model.  Now, it's very clear what
> this solution looks like; as we vary d the solution 'slides' from the
> easy-to-solve-in-a-closed-form solutions to
> 
> x^n=c
> 
> and
> 
> x^2=c,
> 
> that is, x=c^{1/2} and x=c^{1/n}.  So I know what the solution looks
> like, but when I leave it in symbolic form, Solve doesn't like it, and
> says it's fundamentally not algebraic.  I presume this is because the
> number of roots depends on n, which isn't given, so Solve panics.  But
> I only really care about the real solution between 0 and 1- is there
> any way to get the form of this solution as a function of both n and c?
> 
> Thanks for enlighening me.
> 
> Dennis
> 

Hi Dennis,

I am afraid that your intuition is wrong and that closed form solutions 
are more complicated that what you think. To explore the full set of 
solutions, use *Reduce* and *Assuming*.

In[1]:=
eqn = d*x^n + (1 - d)*x^2 == c;

In[2]:=
Table[{i, Assuming[0 <= d <= 1 && n \[Element] Integers && n >= 0 &&
      c \[Element] Reals, Reduce[eqn /. n -> i, x]]}, {i, 0, 5}]

Out[2]//OutputForm=
{{0, (d == 1 && c == 1) ||

                             Sqrt[-c + d]          Sqrt[-c + d]
     (-1 + d != 0 && (x == -(------------) || x == ------------))},
                             Sqrt[-1 + d]          Sqrt[-1 + d]

   {1, (d == 1 && x == c) ||

                                                   2
                           d - Sqrt[4 c - 4 c d + d ]
     (-1 + d != 0 && (x == -------------------------- ||
                                   2 (-1 + d)

                                      2
              d + Sqrt[4 c - 4 c d + d ]
         x == --------------------------))},
                      2 (-1 + d)

   {2, x == -Sqrt[c] || x == Sqrt[c]},

   {3, (d == 0 && (x == -Sqrt[c] || x == Sqrt[c])) ||

                                  2       2       3
     (d != 0 && (x == Root[-c + #1  - d #1  + d #1  & , 1] ||

                          2       2       3
         x == Root[-c + #1  - d #1  + d #1  & , 2] ||

                          2       2       3
         x == Root[-c + #1  - d #1  + d #1  & , 3]))},

   {4, (d == 0 && (x == -Sqrt[c] || x == Sqrt[c])) ||

     (d != 0 && (x == -(

                                                  2
                      1   Sqrt[1 - 2 d + 4 c d + d ]
             Sqrt[1 - - - --------------------------]
                      d               d
             ----------------------------------------) ||
                             Sqrt[2]

                                                   2
                       1   Sqrt[1 - 2 d + 4 c d + d ]
              Sqrt[1 - - - --------------------------]
                       d               d
         x == ---------------------------------------- ||
                              Sqrt[2]

                                                      2
                    1    1    Sqrt[1 - 2 d + 4 c d + d ]
         x == -Sqrt[- - --- + --------------------------] ||
                    2   2 d              2 d

                                                     2
                   1    1    Sqrt[1 - 2 d + 4 c d + d ]
         x == Sqrt[- - --- + --------------------------]))},
                   2   2 d              2 d

   {5, (d == 0 && (x == -Sqrt[c] || x == Sqrt[c])) ||

                                  2       2       5
     (d != 0 && (x == Root[-c + #1  - d #1  + d #1  & , 1] ||

                          2       2       5
         x == Root[-c + #1  - d #1  + d #1  & , 2] ||

                          2       2       5
         x == Root[-c + #1  - d #1  + d #1  & , 3] ||

                          2       2       5
         x == Root[-c + #1  - d #1  + d #1  & , 4] ||

                          2       2       5
         x == Root[-c + #1  - d #1  + d #1  & , 5]))}}

In[3]:=
Assuming[0 <= d <= 1 && n \[Element] Integers && n >= 0 && c \[Element] 
Reals,
   Reduce[eqn /. d -> 0, x, Reals]]

Out[3]//OutputForm=
c >= 0 && (x == -Sqrt[c] || x == Sqrt[c])

In[4]:=
Assuming[0 <= d <= 1 && n \[Element] Integers && n >= 0 && c \[Element] 
Reals,
   Reduce[eqn /. d -> 1, x, Reals]]

Out[4]//OutputForm=
                                                          1/n
(c == 1 && n == 0 && x > 0) || (n != 0 && c > 0 && x == c   ) ||

                   n
   (n > 0 && c == 0  && x == 0) || (c == 1 && n == 0 && x < 0) ||

    n                                         1/n
   (- \[Element] Integers && n != 0 && c > 0 && x == -c   ) ||
    2

     1 + n                                                 1/n
   ((----- | n) \[Element] Integers && n != 0 && c < 0 && x == -(-c)   )
       2

In[5]:=
Table[{i, Assuming[0 <= d <= 1 && n \[Element] Integers && n >= 0 &&
      c \[Element] Reals, Reduce[eqn /. n -> i, x, Reals]]}, {i, 0, 5}]

(* I have deleted the output since it is really too long ... *)

Best regards,
Jean-Marc


  • Prev by Date: Behavior of ReplaceAll with Computed Results from a Conditional Test
  • Next by Date: Re: Figures and LaTeX
  • Previous by thread: Re: Closed Form solution too much to hope for?
  • Next by thread: Re: Closed Form solution too much to hope for?