Implicit differentiation of this equation

22 ビュー (過去 30 日間)
Ankit Gupta
Ankit Gupta 2018 年 8 月 23 日
コメント済み: UMAIR 2023 年 4 月 9 日
I am learning Differentiation in Matlab I need help in finding implicit derivatives of this equations find dy/dx when x^2+x*y+y^2=100 Thank you.
  1 件のコメント
madhan ravi
madhan ravi 2018 年 8 月 23 日
Is y a function of x and x(t)?

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2018 年 8 月 23 日
syms x y
diff(solve(x^2+x*y+y^2==100,y),x)
You will get two solutions because there are two distinct y for each x
If you want, you could continue
syms dy; solve(dy == diff(solve(x^2+x*y+y^2==100,y),x),x)
to get x in terms of dy
  2 件のコメント
Ankit Gupta
Ankit Gupta 2018 年 8 月 25 日
what if i need answer in terms of x and y?
Walter Roberson
Walter Roberson 2018 年 8 月 26 日
I do not know how to solve it in terms of x and y.

サインインしてコメントする。

その他の回答 (1 件)

Mbar
Mbar 2020 年 10 月 18 日
編集済み: Mbar 2020 年 10 月 18 日
Consider implicit function . It is not always possible to solve analytically for . However, almost always you can use the Implicit Function Theorem:
, as long as .
( are partial derivatives: ).
Thus, define the implicit function, , and the derivative is
. In Matlab (using Symbolic Math Toolbox):
syms x y %Declaring symbilic variables
F(x,y) = x^2 + x*y + y^2 - 100 %Declaring implicit function
% Using Implicit Function Theorem
dy_dx = - diff(F,x)/diff(F,y)
% Answer:
% -(2*x + y)/(x + 2*y)
This derivative is a function of both x and y. However it has a meaning only for pairs which satisfy the implicit function . You can solve for such points using what Walter Roberson suggested. For example, solve for y as a function of x, and substitute :
double(subs(solve(F, y), x, 10))
This gives two points which satisfy the implicit function: , and . You can calculate the derivatve at these points for example:
x0 = 10; y0 = -10;
F(x0, y0) %answer 0, i.e. the implicit function is satisfied.
dy_dx(x0, y0) %answer 1
x1 = 10; y1 = 0;
F(x1, y1) %answer 0, i.e. the implicit function is satisfied.
dy_dx(x1, y1) %answer -2
  1 件のコメント
UMAIR
UMAIR 2023 年 4 月 9 日
If we want to find d^2y/dx^2 ?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by