Implicit Differentiation made easy with Mathematica
Implicit Differentiation made easy with Mathematica
PeterCullenBurbery
I work through various examples of implicit differentiation.
Details
Details
These examples are from the documentation. I modified some of the functions and created my own examples.
In[]:=
q1=QuestionObject["What is the derivative of 2z with respect to x where z is constrained by +=1?",AssessmentFunction[ImplicitD[2z,+==1,z,x]]]
2
x
2
z
2
x
2
z
Out[]=
In[]:=
ImplicitD[2z,+==1,z,x]
2
x
2
z
Out[]=
-
2x
z
In[]:=
q1
Out[]=
In[]:=
q2=QuestionObject["What is the second derivative of log(xz), assuming that -xsin(z)0?",AssessmentFunction[ImplicitD[Log[xz],-xSin[z]==1,z,{x,2}]]]
2
z
2
z
Out[]=
In[]:=
ImplicitD[Log[xz],-xSin[z]==1,z,{x,2}]//TraditionalForm
2
z
Out[]//TraditionalForm=
1
2
x
2
z
3
(xcos(z)-2z)
3
x
2
z
3
cos
3
x
3
sin
3
x
2
cos
3
x
2
sin
2
x
3
z
2
cos
2
x
2
z
2
x
2
sin
4
z
5
z
In[]:=
q2
Out[]=
In[]:=
q3=QuestionObject["z is constrained by ++=5 and z is constrained by log(w x)=z. What is the implicit derivative of with respect to w?",AssessmentFunction[ImplicitD[,{++==5,Log[wx]==z},{x,z},w]]]
2
w
3
x
4
z
(w+x+z)
w+x+z
2
w
3
x
5
z
Out[]=
In[]:=
ImplicitD[,{++==5,Log[wx]==z},{x,z},w]//TraditionalForm
w+x+z
2
w
3
x
5
z
Out[]//TraditionalForm=
-(2x+2-3w-5w-3+5x)
w+x+z
2
w
2
w
3
x
4
z
3
x
4
z
w(3+5)
3
x
4
z
In[]:=
q3
Out[]=
In[]:=
q4=QuestionObject["z is bound by the implicit equation ==x. What is the derivative of sin(z) with respect to x and t?",AssessmentFunction[ImplicitD[Sin[z],==x,z,x,t]]]
t
z
t
z
Out[]=
In[]:=
ImplicitD[Sin[z],==x,z,x,t]//TraditionalForm
t
z
Out[]//TraditionalForm=
1-t
z
2
t
In[]:=
q4
Out[]=
In[]:=
q5=QuestionObject["What is the derivative of -3xz=2 of z with respect to x?",AssessmentFunction[ImplicitD[-3xz==2,z,x]]]
3
z
3
z
Out[]=
In[]:=
ImplicitD[-3xz==2,z,x]//TraditionalForm
3
z
Out[]//TraditionalForm=
z
2
z
In[]:=
q5
Out[]=
In[]:=
q6=QuestionObject["What is the derivative of sin(x z) with respect to x if z is implicitly defined by the polynomial equation +2x=0?",AssessmentFunction[ImplicitD[Sin[xz],+2x==0,z,x]]]
4
z
4
z
Out[]=
In[]:=
ImplicitD[Sin[xz],+2x==0,z,x]//TraditionalForm
4
z
Last but not least I can find the arity of a function:
I define a function for the arity of a function:
I remember seeing implicit derivatives in my calculus class so I think its cool that there's now a function to solve this.
Use Simplify to find the simplest form:
I use the following variable assignments, but its basically the same problem:
Solve an implicit differentiation problem with four variables: