Re: Sinh[y]/y as y->0?
- To: mathgroup at smc.vnet.net
- Subject: [mg33492] Re: [mg33449] Sinh[y]/y as y->0?
- From: BobHanlon at aol.com
- Date: Fri, 22 Mar 2002 04:08:58 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
In a message dated 3/21/02 11:51:16 AM, siegman at stanford.edu writes:
>A particular calculation produces at an early stage the intermediate result
>
> p1 = (Sin[x]/x) + (Sinh[y]/y) , (x and y both real)
>
>and this result then feeds into further expressions in a lengthy symbolic
>
>calculation.
>
>When I try to do any numerical evaluations of the final expressions with
>either
>x or y = 0, I get "Indeterminate expression" or "infinity 1/0" error
messages,
>
>even though the expressions themselves, like the expression above, are
>perfectly
>determinate and finite for those limits.
>
>Any simple way to make this expression behave as it should under numerical
>
>evaluation?
>
sa[x_ /; x==0] := 1;
sa[x_?NumericQ] := Sin[x]/x;
sah[x_ /; x==0] := 1;
sah[x_?NumericQ] := Sinh[x]/x;
p1=(Sin[x]/x)+(Sinh[y]/y);
p1 = (p1 /.
{Sin[x_]/x_ -> sa[x], Sinh[x_]/x_ -> sah[x]});
Bob Hanlon
Chantilly, VA USA