How to find the common root between two quadratic equations?

2 ビュー (過去 30 日間)
roro6992
roro6992 2013 年 8 月 23 日
Hi evryone,
Am a beginner to Matlab,m trying to find out the common root between two quadratic equations of same variable x..plzz tell me how to do it. Plzz help!

回答 (2 件)

Matt J
Matt J 2013 年 8 月 23 日
編集済み: Matt J 2013 年 8 月 23 日
The ROOTS command should let you find and compare the roots of the 2 quadratics.
  2 件のコメント
roro6992
roro6992 2013 年 8 月 23 日
編集済み: roro6992 2013 年 8 月 23 日
But in dis case I need to find common root within a function whr I cnnt see d roots n compare by myslf. Is dere any method for directly finding d common root?? Plzz reply!
Matt J
Matt J 2013 年 8 月 24 日
編集済み: Matt J 2013 年 8 月 24 日
Using the ROOTS command you can see the roots.

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


Walter Roberson
Walter Roberson 2013 年 8 月 24 日
Let the two equations be of the form
a1*x^2+b1*x+c1 = 0
a2*x^2+b2*x+c2 = 0
then if
(1/4)*a2*b1^2/a^2+(-(1/2)*b2/a+(1/2)*a2*(b1^2-4*a1*c1)^(1/2)/a^2)*b1+(1/4)*a2*(b1^2-4*a1*c1)/a^2+c2-(1/2)*b2*(b1^2-4*a1*c1)^(1/2)/a
is 0, then the common root is
(-b1-sqrt(b1^2-4*a1*c1))/(2*a)
and otherwise the common root is
(-b1+sqrt(b1^2-4*a1*c1))/(2*a)
Provided, that is, that there really is a common root.

カテゴリ

Help Center および File ExchangeQuadratic Programming and Cone Programming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by