Ask Your Question

wrenoud's profile - activity

2020-01-07 17:44:42 +0200 received badge  Notable Question (source)
2020-01-07 17:44:42 +0200 received badge  Famous Question (source)
2018-04-16 11:45:46 +0200 received badge  Popular Question (source)
2017-10-05 17:46:10 +0200 received badge  Editor (source)
2017-10-04 18:52:26 +0200 received badge  Student (source)
2017-10-04 18:52:23 +0200 received badge  Self-Learner (source)
2017-10-04 18:52:23 +0200 received badge  Teacher (source)
2017-10-04 18:48:52 +0200 commented question How to take partial derivative of abstract/unknown function?

I found an example in the docs after asking: Solving Differential Equations

Applying to the example given in the question though:

var("x")
f = function("f")(x)
g = x * f
g.diff(x)

Output:

x*diff(f(x), x) + f(x)
2017-10-04 18:48:52 +0200 asked a question How to take partial derivative of abstract/unknown function?

I have a function f(x) that I do not want to be expanded but wish to evaluate the partial derivative of g(x,f(x),...) with respect to x, I can not figure out how to declare the function and indicate it is a function of x without an explicit definition.

Code example:

var("x")
f = ??? # how do I define this?
g = x * f(x)
g.diff(x)

Expected output:

x * f'(x) + f(x)