Re: Simple Differentiation?
- To: mathgroup at smc.vnet.net
- Subject: [mg46036] Re: Simple Differentiation?
- From: Bill Rowe <readnewsciv at earthlink.net>
- Date: Tue, 3 Feb 2004 03:21:16 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
On 2/2/04 at 5:21 AM, pinnama at cims.nyu.edu (Sunil Pinnamaneni) wrote: >In Mathematica 5.0, if one types in: >f[x_]+g[x_]^:=1 (1) >and then types >dx(f[x]+g[x]) >we get 0. >However, if we type dx(f[x]) + dx(g[x]) after typing (1), we get >f'[x] + g'[x]. >Mathematica doesn't recognize that f'[x]+g'[x]= dx(f[x]+g[x]), >which equals 0. How does one get Mathematica to do this? I think your problem is a misunderstanding of Mathematica syntax. dx(f[x]+g[x]) is not the derivative. Instead it is interpreted by Mathematica as the product of a variable dx and the sum of two functions, g and f. So if you literally typed dx(f[x]) you should have gotten the result dx f[x] not f'[x] as you've indicated. Now assuming you did ask Mathematica to take the derivative of f[x] then Mathematica would correctly return f'[x] since you have not defined either f[x] or f'[x]. What you have defined is the sum of the derivatives for g and f. Specifically, doing D[f[x]+g[x], x] results in 0 according to your definition above But D[f[x],x] + D[g[x], x] results in f'[x] + g'[x] -- To reply via email subtract one hundred and four