MathGroup Archive 2006

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

Search the Archive

Re: How do I create a parametric expression?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg68592] Re: How do I create a parametric expression?
  • From: axlq at spamcop.net (axlq)
  • Date: Fri, 11 Aug 2006 04:39:58 -0400 (EDT)
  • References: <ebc7b6$l58$1@smc.vnet.net> <ebebds$les$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

In article <ebebds$les$1 at smc.vnet.net>,
Jean-Marc Gulliet  <jeanmarc.gulliet at gmail.com> wrote:
>
>Use Replace [1] with level specification [2]:

Hi Jean-Marc,

Thanks for the tip, but I must point out that the example you
provided shows that it doesn't work correctly:

>expr = -((1 + 2*n)*((a^4*k^2 + a^2*(-1 + k^2*(q - z)^2) + 2*(q - 
>z)^2)*Cos[k*Sqrt[a^2 + (q - z)^2]] - k*(a^2 - 2*(q - z)^2)*Sqrt[a^2 + (q 
>- z)^2]*Sin[k*Sqrt[a^2 + (q - z)^2]])*Sin[((1 + 
>2*n)*Pi*z)/L])/(8*Pi*w*(a^2 + (q - z)^2)^(5/2))
>
>Replace[expr, Sqrt[a^2 + (q - z)^2] -> R, {0, Infinity}]
>
>--> -(((1 + 2*n)*((a^4*k^2 + a^2*(-1 + k^2*(q - z)^2) + 2*(q - 
>z)^2)*Cos[k*R] - k*R*(a^2 - 2*(q - z)^2)*Sin[k*R])*Sin[((1 + 
>2*n)*Pi*z)/L])/(8*Pi*w*(a^2 + (q - z)^2)^(5/2)))

See that last term at the very end: (a^2 + (q - z)^2)^(5/2) This
should have been replaced with R^5.  Similarly there are other
places that could be expressed in terms of R.  I don't want a
simple substitution; I want a parametric expression in terms of the
parameter I define.

-Alex


  • Prev by Date: RE: Re: MemberQ
  • Next by Date: Re: Simple Plot3D/Function Syntax issue
  • Previous by thread: Re: How do I create a parametric expression?
  • Next by thread: Re: How do I create a parametric expression?