MathGroup Archive 2007

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

Search the Archive

Self-teaching snag

  • To: mathgroup at
  • Subject: [mg74556] Self-teaching snag
  • From: Todd Allen <genesplicer28 at>
  • Date: Mon, 26 Mar 2007 02:04:14 -0500 (EST)

Hi All,

   I am trying to refresh my skills in basic problem
solving using Mathematica, but am running into some
difficulties which are beginning to make me suspicious
of Mathematica itself.  (I probably should be
suspicious of my own brain...but you know how that is

Here is the scenario:  I have written a basic function
to tell me what percentage of battery power will
remain in a battery after x number of days, provided
that we start with a full charge and lose 5% of that
charge per day.

If you execute the following code in Mathematica

charge[0]=1.0 (* 100% *);

I receive an output of 0.358486 for my query at the 20
day, no problem so far.

However, when I try to ask for the output at
charge[35], mathematica seems to enter an endless
calculation.  I've let the computer run for as long as
5 minutes without getting an answer.  Is there
something wrong with my function, my version of
Mathematica or something else I haven't considered?


When I try the following:


Mathematica gives me the error:
"$RecursionLimit::reclim: Recursion depth of 256

I am trying to ask Mathematica to tell my how many
days it takes to reduce the battery power to 15
percent, but I must be messing something up??

If anyone has any pointers, I'd certainly appreciate
it, because I am a little stuck right now.

Best regards,
Todd Allen

We won't tell. Get more on shows you hate to love 
(and love to hate): Yahoo! TV's Guilty Pleasures list. 

  • Prev by Date: Re: How to choose real positive solutions only?
  • Next by Date: Re: Some questions about vector
  • Previous by thread: Re: Inverse of arbitrary functions
  • Next by thread: Re: Self-teaching snag