How to create a symbolic general (without explicit definition) function?
8 views (last 30 days)
Yunshen Huang on 10 Mar 2021
I want to know how to create a general function in symbolic way. My goal is to examine the differentials of the overall function in terms of a variable, where there are some functions of this variable that I am not interested in. I checked some documents, all ask me to explicitly define those functions.
Here is a example I am thinking of, which is realized in the psudo code:
syms x g real
f = x*g(x);
fdx = simplify(diff(f,x))
where g is the general function that I want to create. Therefore, this code is supposed to give me the result like:
fdx = g(x)+x*ddxg(x)
Since I really don't care the expression of g(x), a representation like ddxg(x) is what I want in the result.
Thanks in advance!