syms x y;
>> g=sym('x*y^2 - exp(y/x)')
g =
x*y^2 - exp(y/x)
>> dgdx2=diff(g,x,2)
dgdx2 =
- (y^2*exp(y/x))/x^4 - (2*y*exp(y/x))/x^3
syms x y;
>> g=sym('x*y^2 - exp(y/x)')
g =
x*y^2 - exp(y/x)
>> dgdx2=diff(g,x,2)
dgdx2 =
- (y^2*exp(y/x))/x^4 - (2*y*exp(y/x))/x^3