[Date Index]
[Thread Index]
[Author Index]
Re: Differentiation wrt functions in Mathematica
*To*: mathgroup at smc.vnet.net
*Subject*: [mg20361] Re: [mg20327] Differentiation wrt functions in Mathematica
*From*: "Andrzej Kozlowski" <andrzej at tuins.ac.jp>
*Date*: Sun, 17 Oct 1999 03:01:49 -0400
*Sender*: owner-wri-mathgroup at wolfram.com
Mathematica's D[f,x] ignores any implicit relationships between f and x. You
can get what you want by using the total derivative Dt:
In[2]:=
Dt[Sin[x], Cos[x]] /. Dt[x, f_] -> 1/Dt[f, x]
Out[2]=
-Cot[x]
This is better than what you get by using your "reformulation":
In[3]:=
D[(1 - Cos[x]^2)^(1/2), {Cos[x], 1}] // Simplify
Out[3]=
Cos[x]
-(-------------)
2
Sqrt[Sin[x] ]
The reason of course is that it is not true that Sin[x] is always (1 -
Cos[x]^2)^(1/2), sometimes it is -(1 - Cos[x]^2)^(1/2).
--
Andrzej Kozlowski
Toyama International University
JAPAN
http://sigma.tuins.ac.jp
http://eri2.tuins.ac.jp
----------
>From: jonparker at my-deja.com
>To: mathgroup at smc.vnet.net
>Subject: [mg20361] [mg20327] Differentiation wrt functions in Mathematica
>Date: Sat, Oct 16, 1999, 9:20
>
> I am trying to get Mathematica 3.0 to differentiate equations
> containing Sin and Cos terms, with respect to Sin[x] and Cos[x]. On
> investigation of the results I find I am not getting the answer I
> expect. As a test I asked M to evaluate the following:
> D[Sin[x],{Cos[x],1}]
> and go the result 0. I would have expected to get -Cos[x]/Sin[x]. If
> I reformulate the expression as:
> D[(1-Cos[x]^2)^.5,{Cos[x],1}]
> I then get the answer I expect. This work-around is not convenient for
> the full expressions I would like to deal with.
>
> Is there a way of reminding M the Sin=(1-Cos^2)^.5?
> Thanks, Jon
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
Prev by Date:
**Re: OOP in Mathematica -- please help a newbie**
Next by Date:
**Re: ComplexExpand (V4.0)**
Previous by thread:
**Re: Differentiation wrt functions in Mathematica**
Next by thread:
**ComplexExpand (V4.0)**
| |