|
|
| Author |
Message |
rickhg12hs science forum beginner
Joined: 01 Apr 2006
Posts: 3
|
Posted: Sat Apr 01, 2006 8:22 am Post subject:
MuPAD implicit differentiation?
|
|
|
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:
{{{
| Quote: | 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)
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?
Thanks! |
|
| Back to top |
|
 |
John O'Flaherty science forum beginner
Joined: 07 May 2005
Posts: 41
|
Posted: Sun Apr 02, 2006 12:46 am Post subject:
Re: MuPAD implicit differentiation?
|
|
|
rickhg12hs wrote:
| Quote: | 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 |
|
| Back to top |
|
 |
rickhg12hs science forum beginner
Joined: 01 Apr 2006
Posts: 3
|
Posted: Sun Apr 02, 2006 7:30 am Post subject:
Re: MuPAD implicit differentiation?
|
|
|
|
Thanks John. |
|
| Back to top |
|
 |
Christopher Creutzig science forum Guru Wannabe
Joined: 03 May 2005
Posts: 107
|
Posted: Mon Apr 03, 2006 10:13 pm Post subject:
Re: MuPAD implicit differentiation?
|
|
|
rickhg12hs wrote:
| Quote: | I submitted a question about implicit differentiation at the MuPAD
website, and frankly, the responses puzzled me. I'm no mathematician,
|
I'd like to add that the responses did include a comment why your
“possible hack” is correct whenever the conditions for having a
well-defined implicit derivative are fulfilled. Sorry for not answering
to the question you had issued as a reply, but the ticket had been
closed already. The condition on your specific computation is simply
df/dy <> 0.
| Quote: | {{{
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?
|
Sorry to say, but my colleague probably didn't read the result before
submitting his comment. Please try
| Quote: | 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)
| Quote: | solve(%, diff(y(x), x))
|
/ { y(x) + 1 }
piecewise| { - ------------- } if x - cos(y(x)) <> 0,
\ { x - cos(y(x)) }
{} if y(x) + 1 <> 0 and x - cos(y(x)) = 0,
\
C_ if y(x) + 1 = 0 and x - cos(y(x)) = 0 |
/
instead. Unlike the “hack” you mentioned, it tells you where implicit
differentiation breaks, see the condition in the first line.
Regards,
Christopher |
|
| Back to top |
|
 |
rickhg12hs science forum beginner
Joined: 01 Apr 2006
Posts: 3
|
Posted: Tue Apr 04, 2006 5:02 am Post subject:
Re: MuPAD implicit differentiation?
|
|
|
|
Thank you Christopher. |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|
|
The time now is Wed Jan 07, 2009 9:38 pm | All times are GMT
|
|
Car Finance | Capitial One Visa Information | Charity | Credit Card | Mortgage Calculator
|
|
Copyright © 2004-2005 DeniX Solutions SRL
|
|
Other DeniX Solutions sites:
Electronics forum |
Medicine forum |
Unix/Linux blog |
Unix/Linux documentation |
Unix/Linux forums
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|