Re: sum problem with infinity
- To: mathgroup at smc.vnet.net
- Subject: [mg33010] Re: sum problem with infinity
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Tue, 26 Feb 2002 04:34:50 -0500 (EST)
- Organization: Universitaet Leipzig
- References: <a5clnv$9ip$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
- Sender: owner-wri-mathgroup at wolfram.com
Hi, Sum[] has the attribute HoldAll and the D[] operation is not evaluated. So You keep Sum[D[something,y],__] and replace y by a numerical value and D[] say that D[something,0.9] is not possible. So, you must force to evaluate the argument of Sum[] with dsum = D[\[Psi][x, y], y] /. HoldPattern[Sum[b_.*a_D, ll_]] :> Sum[Evaluate[b*a], ll]; and now you can replace x and y dsum /. y -> 0.9 /. x -> 0.8 Regards Jens Doron wrote: > > 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 .