Question: How do I make a function dependant on a variable

I would like to define J=(y1-y10)^2+(y2-Y20)^2+k*(u1)^2+k*(u2)^2 where y1 is a function of u1 and u2 y2 is a function of u1 and u2 then I need to diff(J,u1), diff(J,u1,u2) Thank you for your support Don
Please Wait...