FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Forum index » Science and Technology » Math » Symbolic
MuPAD implicit differentiation?
Post new topic   Reply to topic Page 1 of 1 [5 Posts] View previous topic :: View next topic
Author Message
rickhg12hs
science forum beginner


Joined: 01 Apr 2006
Posts: 3

PostPosted: Sat Apr 01, 2006 8:22 am    Post subject: MuPAD implicit differentiation? Reply with 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:

{{{
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(%, 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?

Thanks!
Back to top
John O'Flaherty
science forum beginner


Joined: 07 May 2005
Posts: 41

PostPosted: Sun Apr 02, 2006 12:46 am    Post subject: Re: MuPAD implicit differentiation? Reply with quote

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

PostPosted: Sun Apr 02, 2006 7:30 am    Post subject: Re: MuPAD implicit differentiation? Reply with quote

Thanks John.
Back to top
Christopher Creutzig
science forum Guru Wannabe


Joined: 03 May 2005
Posts: 107

PostPosted: Mon Apr 03, 2006 10:13 pm    Post subject: Re: MuPAD implicit differentiation? Reply with quote

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

PostPosted: Tue Apr 04, 2006 5:02 am    Post subject: Re: MuPAD implicit differentiation? Reply with quote

Thank you Christopher.
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [5 Posts] View previous topic :: View next topic
The time now is Wed Jan 07, 2009 9:38 pm | All times are GMT
Forum index » Science and Technology » Math » Symbolic
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts MuPAD News Richard Kanarek Symbolic 4 Fri Jul 14, 2006 6:55 am
No new posts Recommendation for numerical differen... 1940LaSalle@gmail.com num-analysis 6 Wed Jul 12, 2006 8:07 pm
No new posts Numerical differentiation formulas? 1940LaSalle@gmail.com Math 2 Wed Jul 12, 2006 8:01 pm
No new posts Differentiation, limits, and differen... Hatto von Aquitanien Math 0 Fri Jun 23, 2006 2:27 am
No new posts Question about Implicit Differentiation Shane Strate Undergraduate 6 Wed Jun 14, 2006 6:08 pm

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
[ Time: 0.7691s ][ Queries: 16 (0.6743s) ][ GZIP on - Debug on ]