Mathematica: take derivative in terms of original function

Click For Summary

Discussion Overview

The discussion revolves around how to manipulate derivatives in Mathematica to express them in terms of the original function. Participants explore methods to achieve this transformation, particularly focusing on the derivative of a function defined with parameters.

Discussion Character

  • Technical explanation, Exploratory

Main Points Raised

  • One participant asks how to express the derivative of a function in terms of the function itself, using a general form.
  • Another participant provides a specific example with the function f[x,y] = Exp[a*(x+y)], noting that the derivative results in a*Exp[a*(x+y)] and seeks a way to express this as a*f[x,y].
  • A suggestion is made to undefine the original function f[x,y] after taking the derivative and then use a substitution to achieve the desired form.
  • A follow-up question is raised about the method to undefine the original function in Mathematica.
  • A reference to Mathematica's Clear function is provided as a potential solution for undefining the function.

Areas of Agreement / Disagreement

Participants do not reach a consensus on a definitive method, and multiple approaches are discussed without resolution on the best practice.

Contextual Notes

Participants express uncertainty about the reliability of the suggested method for backsubstituting into the desired form, indicating it may be error-prone.

PlasticOh-No
Messages
18
Reaction score
0
Hello,

Let's say we have

f[x_,y_]:= whatever

then we say

expr1 = D[f[x,y],x]

which is some complicated expression.

How can we get the answer in terms of f[x,y]? That is, how can we get expr1 to look like:

expr1 = f[x,y]*this term + pi*Sqrt[f[x,y]] + et cetera?

Thanks Gurus
 
Physics news on Phys.org
Ok let me make this a little clearer.
Let's say we have
f[x_,y_]:=Exp[a*(x+y)]
where a is some real parameter.
Now we take
D[f[x,y],x]
which is equal to
a*Exp[a*(x+y)].
How can I get Mathematica to give a result like
a*f[x,y]

Thank you in advance for you attention on this.
 
Try this and see if it will do what you want.
After you have taken the derivative then Undefine f[x,y] and then try
yourResult/.Exp[a*(x+y)]->f[x,y]
and see if you can get it to backsubstitute into the form you desire.

The reason you need to undefine f[] is to keep Mathematica from immediately expanding back to the definition.

This is a somewhat error prone method, but if used with care and checking can often work.
 
Thanks for your reply. Just one thing - how do I undefine the original definition of f[x_,y_] ??

Thanks again
 
Thank you
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
Replies
8
Views
4K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 19 ·
Replies
19
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K