partial derivative and quotient rule and a product rule
4 views (last 30 days)
Show older comments
hi all i have a partial derivative which needs to be programmed on matlab.
struggling atm. help would be grateful.
m=(-10.4a-1.2b+1.2ab+28.8)(9.2ab-9.2ab^2)/(16b-16b^2+(7.1-2.3a)*(9.2a-9.2ab)+32.66ab-10.58ba^2)
we need to differentiate m with respect to a and b and equal it to zero.
we want to find out a and b when the above mentioned scenario is equal to zero.
Answers (1)
MICHAEL RILEY
on 28 Mar 2020
Edited: MICHAEL RILEY
on 28 Mar 2020
Well the first issue you have, is that syntactically your code will not run. You are missing operators in your equation for matlab to run. I have expanded your equation, really more than I normally would, to show you the operators you are missing. Also for the ab^2 terms it is unclear if you are square both or not.
Secondly, you need to use the symbolic library to take the derivative with respect to a or b
syms a b
m = (-10.4 * a - 1.2 * b + 1.2 * a * b + 28.8) * (9.2 * a * b - 9.2 * a * b ^ 2) /...
(16 * b - 16 * b ^ 2 + (7.1 - 2.3 * a) * (9.2 * a - 9.2 * a * b) +...
32.66 * a * b - 10.58 * b * a ^ 2)
dm_da = diff(m, a)
dm_db = diff(m, b)
m =
m =
m =
2 Comments
Khawla Albanna
on 28 Mar 2020
Hi, I have a question how to download the symbolic library. Because I am getting an error with my codes while using syms.
Walter Roberson
on 29 Mar 2020
Khawla Albanna is it possible that you are using R2019a on MacOS Catalina ? (I cannot remember if it applies to R2019b as well) ? If so then you should upgrade to at least R2019b Update 4.
See Also
Categories
Find more on Symbolic Math Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!