MathGroup Archive 2003

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

Search the Archive

Different answers between versions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg42864] Different answers between versions
  • From: nilton.volpato at ig.com.br (Nilton Volpato)
  • Date: Wed, 30 Jul 2003 19:32:01 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

I'm getting different answers with the Solve function, like this:

************
Version 5.0:
************
In[5]:= Solve[ { f[0.] == -h1, f[cmin] == 0., f[ 0.5 cmax ] == h2,
f[cmax] == 0., f[.94 lmax ] == h1, f[ .75 cmax ] == h2/3., f'[0.] ==
0., f'[0.5 cmax] == 0., f'[cmax] == 0., f''[cmin] == 0. } //. {
cmax->480., cmin->120., lmax->600., h1->100., h2->120.,
f[x_]->Plus@@Table[ a[i] x^i, {i,0, 9}] } ]
Solve::svars: Equations may not give solutions for all "solve"
variables.
Out[5]=
                     -7             12                         -9     
       10
{{a[4] -> -3.49433 10   - 2.80682 10   a[9], a[5] -> 5.18878 10   +
5.37062 10   a[9],

                        -11             8                         -14 
          6
>    a[6] -> -2.38433 10    - 3.70656 10  a[9], a[7] -> 4.40032 10    + 1.1808 10  a[9],

                        -17
>    a[8] -> -2.85223 10    - 1764. a[9]}}

As you can see, mathematica 5.0 Solve function could not give answers
to all variables { a[0], ..., a[9] }.


************
Version 4.1:
************
In[1]:= Solve[ { f[0.] == -h1, f[cmin] == 0., f[ 0.5 cmax ] == h2,
f[cmax] == 0., f[.94 lmax ] == h1, f[ .75 cmax ] == h2/3., f'[0.] ==
0., f'[0.5 cmax] == 0., f'[cmax] == 0., f''[cmin] == 0. } //. {
cmax->480., cmin->120., lmax->600., h1->100., h2->120.,
f[x_]->Plus@@Table[ a[i] x^i, {i,0, 9}] } ]
RowReduce::luc: Result for RowReduce of badly conditioned matrix
    {{1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 100.},
<<9>>} may contain significant numerical errors.
Solve::svars: Equations may not give solutions for all "solve"
variables.
Out[1]=
                                             12                  15   
              18                  21
{{a[0] -> -100., a[1] -> -1.7221 - 2.80682 10   a[6] - 4.95124 10  
a[7] - 5.41969 10   a[8] - 4.75427 10   a[9],

                                   10                 13              
   16                  19
>    a[2] -> 0.0386456 + 5.37062 10   a[6] + 9.1931 10   a[7] + 9.87499 10   a[8] + 8.55493 10   a[9],

                                      8                  11           
      14                  17
>    a[3] -> -0.000179185 - 3.70656 10  a[6] - 6.00131 10   a[7] - 6.23767 10   a[8] - 5.29077 10   a[9],

                       -7            6                  9             
    12                 15
>    a[4] -> 3.10086 10   + 1.1808 10  a[6] + 1.71228 10  a[7] + 1.67987 10   a[8] + 1.3763 10   a[9],

                        -10                         6                 
9                  12
>    a[5] -> -1.81379 10    - 1764. a[6] - 1.9309 10  a[7] - 1.69383 10  a[8] - 1.30804 10   a[9], f'[0.] -> 0.,

>    f'[240.] -> 0., f'[480.] -> 0., f''[120.] -> 0.}}


But mathematica 4.1 can do it.

Besides the error about badly conditioned matrix, the answer from v
4.1 is usable and what I want, but v 5.0 answer is worst. It appears
that Mathematica Solve function involuted, it's not now good as
before.

Does someone know why this happens? Since Mathematica says that there
is no difference between versions or platforms, we can see they really
exist.

Thanks,
-- Nilton


  • Prev by Date: RE: color of an implicit plot
  • Next by Date: Re: Background Colors in The Format Menu
  • Previous by thread: AW: How to multiply two matrix simply?
  • Next by thread: guidance in mathematica