Message Boards Message Boards

2 Replies
0 Total Likes
View groups...
Share this post:

Why getting error on RSolve call?

Posted 10 years ago
Solve::svars: Equations may not give solutions for all "solve" variables.
This message is generated when the number of variables listed in the second argument of Solve
is greater than the number of variables that could be determined from the equations.

I am trying to figure out why I get the above error when I perform "Evaluate Notebook" on the attached fie, "nick-model.nb"
I am using Mathematica8.    I'm a relatively new user.

I count 11 variables in the RSolve 2nd argument (the list) and I count 11 equations in the RSolve 1st argument (plus 11 initial
condition equations, one for each variable).

I fully expected the result "sorry, we can't solve this system of equations", but not the above error.    Can someone please clue
me into the problem?
POSTED BY: Terry Heidelberg
2 Replies
Thanks for the tip.     Although from the first example in ref/If the If[] should work, Mathematica seems happier
with Piecewise[].    Then I was advised to "rationalize" the decimal fractions in the equations, which in this case
was easy to do (e.g. 1/2, 3/4, 2/100).     The revised file is attached.

After these changes, Mathematica chugs for a few seconds, then spits out a multi-line version of the call
to RSolve[], without solving it (and no error message).      Is it just me, or is this behavior of Mathematica
when it (apparently) can't solve the equations, a bit quirky?
POSTED BY: Terry Heidelberg
Looking quickly at the file, I see you have an If statement. For the purposes of symbolically solving something you'll want to get rid of this and replace it with a piecewise function or something functionally equivalent.

If statements are for control flow in a program
Piecewise is for symbolically describing piecewise behavior of a function.
POSTED BY: Sean Clarke
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract