I am trying to take the derivative of a logorithum that consists of three varibles, x1, x2, and u. I think the syntax of my code works somewhat okay, because I get part of the solution. However, I know it is wrong because I did it by hand, and I am missing some terms in the MatLab output. Below is a copy of my code so far. If anyone can help me resolve this issue, it will be greatly appreciated, thank you in advance.
I have attached a image of what the solution should look like.
clc, clear, close all
syms x1 x2 u
J = log(x1)+2*log(x2)+3*log(u);
delJdelx1 = diff(J,x1)
delJdelx2 = diff(J,x2)