EDITED
I have a function in a list like :
func={2(x^2)+x*y+3(y^2)};
I want to have a UI that ask me which parameter (x or y) is a variable in a Do[]
loop, then calculate the partial derivatives of func
with respect to that variable and in each iteration ask again; then use the output in another equation.For example :
*1st. iteration
-ask about the variable
-variable is `y`
-calculate the partial derivative `func` with respect to `y`
-output is `x+6y`
-save the output in a list `{{x+6y}}
*2nd. iteration
-ask about the variable
-variable is `x`
-calculate the partial derivative `func` with respect to `x`
-output is `4x+y`
-save the output in a list `{{4x+y}}
`Finallist={{x+6y},{4x+y}}`
I would be appreciated if you could help me. Thank you in advance.
xy
is not the same asx*y
$\endgroup$SetterBar[Dynamic[variable], {x, y}]
? ThenD[func, variable]
, wherever you need it, would give the partial derivative. $\endgroup$