       Re: normalization and square roots

• To: mathgroup at smc.vnet.net
• Subject: [mg65787] Re: [mg65739] normalization and square roots
• From: Bob Hanlon <hanlonr at cox.net>
• Date: Mon, 17 Apr 2006 02:28:44 -0400 (EDT)
• Reply-to: hanlonr at cox.net
• Sender: owner-wri-mathgroup at wolfram.com

You need patterns on the LHS of the definition for f[0,...]

myrule=-om+(-1+Sqrt[oro])^2-oro;

Clear[f];
f[0,om_,oro_]=1;
f[x_,om_,oro_]:=1/(Sqrt[oro]-Sqrt[om(1+x)^3+ol+oro])/.
ol->myrule

f[0,a,b]

1

f[0,0.3,0.4]

1

Bob Hanlon

>
> From: wtplasar at ehu.es
To: mathgroup at smc.vnet.net
> Subject: [mg65787] [mg65739] normalization and square roots
>
> [This post has been delayed due to email problems - moderator]
>
>
>
> I have this function
>
> f[x_, om_, oro_] := 1/(Sqrt[oro] - Sqrt[om(1 + x)^3 + ol + oro]) /.
> ol -> myrule
>
> and I want to define a rule (myrule) so that
>
> f[0,om,or0]=1
>
> If I set
>
> myrule=-om + (-1 + Sqrt[oro])^2 - oro;
>
> then it works find when I do not give numerical values to om and oro.
>
> For instance, if I evaluate f[0,a,b] I get 1, but if I evaluate
> f[0,0.3,0.4] I get 3.77485. I think it is just because it is not taking
> the right which is convenient for me.
>
> Can you help me?
>
> Thanks,
>
> Ruth
>
>

• Prev by Date: Re: Plot {x,y} and {x,z} of a List {x,y,z}
• Next by Date: Re: machine precision in plot
• Previous by thread: normalization and square roots
• Next by thread: Re: normalization and square roots