Is this Application of Leibniz Rule in Symbolic Math Toolbox Incorrect?
Referring to Leibniz Integral Rule:
Verify R2025b
matlabRelease
Define some functions
syms t x
syms f_1(x) f_2(x) g(t)
Case 1 looks correct:
syms G(x)
eqn1 = G(x) == int(g(t),t,f_1(x),f_2(x));
eqn2 = diff(eqn1,x);
case1 = [eqn1;eqn2]
Case 2 looks correct. Same as case 1 with dg(t)/dt replacing g(t).
Dg(t) = diff(g(t),t);
eqn3 = G(x) == int(Dg(t),t,f_1(x),f_2(x));
eqn4 = diff(eqn3,x);
case2 = [eqn3;eqn4]
Case 3 looks correct. Same as case 1 with g(t) = h(t)p(t)
syms h(t) p(t)
eqn5 = G(x) == int(h(t)*p(t),t,f_1(x),f_2(x));
eqn6 = diff(eqn5,x);
case3 = [eqn5;eqn6]
Case 4 looks incorrect
Dp(t) = diff(p(t),t);
eqn7 = G(x) == int(h(t)*Dp(t),t,f_1(x),f_2(x));
eqn8 = diff(eqn7,x);
case4 = [eqn7;eqn8]
I don’t understand the meaning of the third multiplicands in both terms of the derivative expression. What does it mean to differentiate with respect to a function?
Seems like case 4 should be:
eqn9 = diff(G(x),x) == h(f_2(x))*Dp(f_2(x))*diff(f_2(x),x) – h(f_1(x))*Dp(f_1(x))*diff(f_1(x),x)
Is case 4 (eqn8) incorrect or am I misunderstanding the mathematical meaning of
diff(p(f_2(x)),f_2(x))Referring to Leibniz Integral Rule:
Verify R2025b
matlabRelease
Define some functions
syms t x
syms f_1(x) f_2(x) g(t)
Case 1 looks correct:
syms G(x)
eqn1 = G(x) == int(g(t),t,f_1(x),f_2(x));
eqn2 = diff(eqn1,x);
case1 = [eqn1;eqn2]
Case 2 looks correct. Same as case 1 with dg(t)/dt replacing g(t).
Dg(t) = diff(g(t),t);
eqn3 = G(x) == int(Dg(t),t,f_1(x),f_2(x));
eqn4 = diff(eqn3,x);
case2 = [eqn3;eqn4]
Case 3 looks correct. Same as case 1 with g(t) = h(t)p(t)
syms h(t) p(t)
eqn5 = G(x) == int(h(t)*p(t),t,f_1(x),f_2(x));
eqn6 = diff(eqn5,x);
case3 = [eqn5;eqn6]
Case 4 looks incorrect
Dp(t) = diff(p(t),t);
eqn7 = G(x) == int(h(t)*Dp(t),t,f_1(x),f_2(x));
eqn8 = diff(eqn7,x);
case4 = [eqn7;eqn8]
I don’t understand the meaning of the third multiplicands in both terms of the derivative expression. What does it mean to differentiate with respect to a function?
Seems like case 4 should be:
eqn9 = diff(G(x),x) == h(f_2(x))*Dp(f_2(x))*diff(f_2(x),x) – h(f_1(x))*Dp(f_1(x))*diff(f_1(x),x)
Is case 4 (eqn8) incorrect or am I misunderstanding the mathematical meaning of
diff(p(f_2(x)),f_2(x)) Referring to Leibniz Integral Rule:
Verify R2025b
matlabRelease
Define some functions
syms t x
syms f_1(x) f_2(x) g(t)
Case 1 looks correct:
syms G(x)
eqn1 = G(x) == int(g(t),t,f_1(x),f_2(x));
eqn2 = diff(eqn1,x);
case1 = [eqn1;eqn2]
Case 2 looks correct. Same as case 1 with dg(t)/dt replacing g(t).
Dg(t) = diff(g(t),t);
eqn3 = G(x) == int(Dg(t),t,f_1(x),f_2(x));
eqn4 = diff(eqn3,x);
case2 = [eqn3;eqn4]
Case 3 looks correct. Same as case 1 with g(t) = h(t)p(t)
syms h(t) p(t)
eqn5 = G(x) == int(h(t)*p(t),t,f_1(x),f_2(x));
eqn6 = diff(eqn5,x);
case3 = [eqn5;eqn6]
Case 4 looks incorrect
Dp(t) = diff(p(t),t);
eqn7 = G(x) == int(h(t)*Dp(t),t,f_1(x),f_2(x));
eqn8 = diff(eqn7,x);
case4 = [eqn7;eqn8]
I don’t understand the meaning of the third multiplicands in both terms of the derivative expression. What does it mean to differentiate with respect to a function?
Seems like case 4 should be:
eqn9 = diff(G(x),x) == h(f_2(x))*Dp(f_2(x))*diff(f_2(x),x) – h(f_1(x))*Dp(f_1(x))*diff(f_1(x),x)
Is case 4 (eqn8) incorrect or am I misunderstanding the mathematical meaning of
diff(p(f_2(x)),f_2(x)) leibniz rule MATLAB Answers — New Questions









