MathGroup Archive 2003

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

Search the Archive

Re: [newbie] can't get the answer

  • To: mathgroup at smc.vnet.net
  • Subject: [mg43138] Re: [mg43117] [newbie] can't get the answer
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Thu, 14 Aug 2003 05:07:54 -0400 (EDT)
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • References: <200308131149.HAA28261@smc.vnet.net>
  • Reply-to: murray at math.umass.edu
  • Sender: owner-wri-mathgroup at wolfram.com

You'll spare yourself many hours of wasted time if you familiarize 
yourself with the introductory material included with Mathematica.

Five of the fundamentals you would learn are:

1. Built-in function names begin with upper-case letters:  Cosh and not 
cosh, etc.

2. Arguments to functions are enclosed in square brackets [] and NOT in 
parentheses ()   (except in certain special input modes):  thus Sin[42] 
and NOT Sin(42).

3. The base "e" of the natural logarithm is most simply typed as E in 
Mathematica -- like all built-in objects, it begins with an upper-case 
letter.  (An alternative is to type Esc ee Esc to get a specially 
formatted double-struck e symbol that Mathematica's input routines 
interpret as E.  Thus Sinh[E^2] and NOT Sinh[e^2].

In view of 1 - 3, the expression you tried, essentially

    cosh(sinh(97))+(sin(42)+sinh(e^2)

did yield as result what you asked for:  a product of the symbol cosh 
with the symbol sinh and the integer 97, plus the product of the symbol 
sin and the integer 42, plus the product of the symbol sinh and the 
square of the symbol (NOT the number E) e.

4. Since Mathematica is a "symbolic algebra program", it will give you 
exact values for exact input.  So the exact arguments 97, 42, and E^2 
yield an exact symbolic value:

    Cosh[Sinh[97]] + Sin[42] + Sinh[E^2]
Cosh[Sinh[97]] + Sin[42] + Sinh[E^2]

5. If, as I suspect you are asking, you want a numerical approximation, 
then you have to ask for it explicitly by wrapping the whole thing with 
N, or by using floating point numbers as the arguments:

   Cosh[Sinh[97.]] + Sin[42.] + Sinh[N[E^2]]

None of the above is going to completely solve your problem, however, as 
the value of Sinh[97.] is very large (on the order of 7 * 10^41):

   Sinh[97.]
6.691673596021348*^41

And THAT value, in turn, is to big to get a floating-point value from 
Cosh -- at least if you are using ordinary machine floating-point 
arithmentic.  Taking Cosh of that yields an overflow error!

The largest floating-point number that Mathematica allows is the value 
of $MaxNumber, which on my machine is not quite 2 * 10^646456887.



Promania Corasna wrote:

> Hello all,
> 
> I'm a newbie in using mathematica 5. I've searched over the internet, but I
> can't find out how to get the answer to my formula. This is the formula, I
> have to calculate:
> 
> cosh(sinh(97))+(sin(42)+sinh(e^2))/1
> 
> This is the answer of mathematica:
> 
> 42\ sin + 97\ cosh\ sinh + e\^2\ sinh\)
> 
> 
> 
> I just niet a answer from plain number.
> 
> Does anybody knows how to do that?
> 
> THanks in advance
> 
> 
> 

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305


  • Prev by Date: Re: Animation of Matrix outputs
  • Next by Date: Re: TeXForm Qns.
  • Previous by thread: Re: [newbie] can't get the answer
  • Next by thread: Re: [newbie] can't get the answer