MathGroup Archive 1995

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

Search the Archive

Re: implicit differentiation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg2861] Re: implicit differentiation
  • From: wagner at bullwinkle.cs.Colorado.EDU (Dave Wagner)
  • Date: Sat, 30 Dec 1995 01:01:23 -0500
  • Organization: University of Colorado, Boulder

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: Mma speed trials (Win'95)
  • Next by Date: Re: implicit differentiation
  • Previous by thread: implicit differentiation
  • Next by thread: Re: implicit differentiation