Re: MuPAD implicit differentiation?




rickhg12hs wrote:
I submitted a question about implicit differentiation at the MuPAD
website, and frankly, the responses puzzled me. I'm no mathematician,
but I'm very curious about it and symbolic math tools. I thought I'd
recap my questions and responses here to hopefully get some more
insight from this forum.

Original Question:

{It would be convenient to have an implicit differentiation function
that could accept equations. For example, given the equation, x + x*y =
sin(y) + 3, what is dy/dx?}

I posted this later as a possible hack:

{{{
f := x + x*y = sin(y) + 3
f_expression := lhs(f) - rhs(f)
dydx := - diff(f_expression,x)/diff(f_expression,y)
}}}

MuPAD team's suggestion:

{{{
>> diff(x + x*y(x) = sin(y(x)) + 3, x)

y(x) + x diff(y(x), x) + 1 = cos(y(x)) diff(y(x), x)
>> solve(%, y'(x))

piecewise(C_ if y(x) + x diff(y(x), x) - cos(y(x)) diff(y(x), x) + 1 =
0,

{} if y(x) + x diff(y(x), x) - cos(y(x)) diff(y(x), x) + 1 <> 0)
}}}

What did "solve" produce? How would I evaluate it at a point on the
curve?

What it produced is the statement that dy/dx can be any point in the
complex plane for condition 1, and no point for condition 2. True,
but...
The method you used seems right, and you can evaluate it by
float(subs(dydx,x=2,y=3)), for example.
--
john

.