MathGroup Archive 2006

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

Search the Archive

Re: Inplicit differentiation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg63559] Re: Inplicit differentiation
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Thu, 5 Jan 2006 03:12:27 -0500 (EST)
  • Organization: The Open University, Milton Keynes, UK
  • References: <dpg0k4$piu$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Fernando Rodríguez wrote:
> Hi,
> 
> How can I ask Mathematica to differentiate a function if y is not easily 
> isolated? For instance:
> 
> x^2 y + (y + x)^3 = 0
> 
> If I call D[x^2 y + (y + x)^3 == 0, x] it won't return the correct answer, 
> as it will consider y a constant.
> 
> Thanks!
> 
> 
Hi Fernando,

You must indicate to Mathematica that the symbol y is a function that 
depends on x or at least that y is not a constant. If you want an 
explicit formula for y' you can try *Solve* as in input [3].

In[1]:=
D[x^2*y[x] + (y[x] + x)^3 == 0, x]

Out[1]=
2*x*y[x] + x^2*Derivative[1][y][x] + 3*(x + y[x])^2*(1 + 
Derivative[1][y][x]) == 0

             2                     2
(that is 2 x y[x] + x  y'[x] + 3 (x + y[x])  (1 + y'[x]) == 0)

In[2]:=
D[x^2*y + (y + x)^3 == 0, x, NonConstants -> y]

Out[2]=
2*x*y + x^2*D[y, x, NonConstants -> {y}] + 3*(x + y)^2*(1 + D[y, x, 
NonConstants -> {y}]) == 0

In[3]:=
Solve[D[x^2*y[x] + (y[x] + x)^3 == 0, x], Derivative[1][y][x]]

Out[3]=
                2                    2
            -3 x  - 8 x y[x] - 3 y[x]
{{y'[x] -> --------------------------}}
               2                    2
            4 x  + 6 x y[x] + 3 y[x]

Hope this helps,
/J.M.


  • Prev by Date: Performance improvement needed - Help.
  • Next by Date: Re: PowerExpand
  • Previous by thread: Re: Inplicit differentiation
  • Next by thread: PowerExpand