MathGroup Archive 2002

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

Search the Archive

RE: sum problem with infinity

  • To: mathgroup at smc.vnet.net
  • Subject: [mg33019] RE: [mg33002] sum problem with infinity
  • From: "David Park" <djmp at earthlink.net>
  • Date: Tue, 26 Feb 2002 04:35:02 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Doron,

You must do the differentiation first and then substitute. Also Sum has the
Attribute HoldAll so to get the derivative evaluated in the sum you must
take some measures. In the rule it is necessary to put the left hand side in
a HoldPattern, otherwise Mathematica tries to evaluate the pattern. This
gets you part way to your goal:

D[\[Psi][x, y], y]
% /. HoldPattern[Sum[a_, b_]] :> Sum[Evaluate[a], b]
% /. y -> 0.9 /. x -> 0.8

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/

> -----Original Message-----
> From: Doron [mailto:klepachd at yahoo.com]
To: mathgroup at smc.vnet.net
> Sent: Monday, February 25, 2002 1:31 AM
> To: mathgroup at smc.vnet.net
> Subject: [mg33019] [mg33002] sum problem with infinity
>
>
> hello,
> I am a problem :
> I defined ->
> \!\(\[Psi][x_, y_] := \(1\/4\) a\^2 -
>       x\^2 - \(\(8
>                a\^2\)\/\[Pi]\^3\) \(\[Sum]\+\(n = \
> 0\)\%\[Infinity]\(\((\(-1\))\)\^n\/\((2  n + 1)\)\^3\) \(Cosh[k[n]*y]\ \
> Cos[k[n]*x]\)\/Cosh[\(1\/2\) k[n]\ b]\)\)
> and tried to compute ->
> D[\[Psi][x, y], y] /. y -> 0.9 /. x -> 0.8
> the answer I got was ->
> General::"ivar": "\!\(0.9`\) is not a valid variable."
>
> General::"stop": "Further output of \!\(General :: \"ivar\"\) will be \
> suppressed during this calculation."
>
> \!\(\(-\(\(32\ \(\[Sum]\+\(n = \
> 0\)\%\[Infinity]\[PartialD]\_0.9`\(\(\((\(-1\))\)\^n\ \((Cosh[
>                           k[n]\ 0.9`]\ Cos[
>                           k[n]\ 0.8`])\)\)\/\(\((2\ n + 1)\)\^3\ Cosh[
>                       1\/2\ k[n]\ b]\)\)\)\)\/\[Pi]\^3\)\)\)
> But when I replaced the sums limit from infinity to 99
> there was no problem and I got a numerical answer.
> Any ideas why ?
> Thank you , Doron .
>



  • Prev by Date: Re: Re: Iterative application of FindRoot with adjusted started values
  • Next by Date: Re: Numerical Differentiation using Fourier Transform
  • Previous by thread: Re: sum problem with infinity
  • Next by thread: books about differential geometry