[Date Index]
[Thread Index]
[Author Index]
Re: implicit differentiation
*Subject*: [mg2861] Re: implicit differentiation
*From*: wagner at bullwinkle.cs.Colorado.EDU (Dave Wagner)
*Date*: 30 Dec 1995 03:51:27 -0600
*Approved*: usenet@wri.com
*Distribution*: local
*Newsgroups*: wri.mathgroup
*Organization*: University of Colorado, Boulder
*Sender*: daemon at wri.com
In article <4bqlk0$4fd at dragonfly.wri.com>, <marshall at CIS.Edu.HK> wrote:
>
>How can I do implicit differentiation ?
>
>
>
Dt[f,x] gives the derivative of an expression f in which all variables
are assumed to depend on x.
In :=
Dt[x^2 Sin[c y], x]
Out =
2
x Cos[c y] (y Dt[c, x] + c Dt[y, x]) + 2 x Sin[c y]
If no independent variable is specified, the answer is expressed in terms of the
total derivatives of each of the unknowns.
In :=
Dt[x^2 Sin[c y]]
Out =
2
x Cos[c y] (y Dt[c] + c Dt[y]) + 2 x Dt[x] Sin[c y]
There are two ways to specify that a particular variable in a total
derivative is a constant. The first way is to used the Constants
option to Dt. This is fairly messy.
In :=
Dt[x^2 Sin[c y], Constants->{c}]
Out =
2
c x Cos[c y] Dt[y, Constants -> {c}] + 2 x Dt[x, Constants -> {c}] Sin[c y]
The second way is to tell Mathematica that a symbol is a constant,
permanently. This is done by giving the symbol the attribute "Constant":
In :=
SetAttributes[c, Constant]
You can check a symbol's attributes with the Attributes command.
In :=
Attributes[c]
Out =
{Constant}
Now the term Dt[c] goes away, without complicating the result.
In :=
Dt[x^2 Sin[c y]]
Out =
2
c x Cos[c y] Dt[y] + 2 x Dt[x] Sin[c y]
Here is an implicitly defined function:
In :=
imp[x_,y_] := Log[y] + x y - 1
Solve[imp[x,y]==0, y]
Solve::tdep:
The equations appear to involve transcendental
functions of the variables in an essentially
non-algebraic way.
Out =
Solve[-1 + x y + Log[y] == 0, y]
In :=
Dt[imp[x,y], x]
Out =
Dt[y, x]
y + x Dt[y, x] + --------
y
In :=
Solve[%==0, Dt[y,x]]
Out =
2
y
{{Dt[y, x] -> -(-------)}}
1 + x y
By the way, you can plot implicitly defined functions using
the standard package Graphics`ImplicitPlot`.
Dave Wagner
Principia Consulting
(303) 786-8371
dbwagner at princon.com
http://www.princon.com/princon
Prev by Date:
**Re: implicit differentiation**
Previous by thread:
**Re: implicit differentiation**
Next by thread:
**Request for Mathematica Queueing Package**
| |