How to solve x^4-p*x+q.solve for x considering p and q as constants

4 ビュー (過去 30 日間)
jahanzaib shahzad
jahanzaib shahzad 2018 年 9 月 23 日
回答済み: Basil C. 2018 年 9 月 24 日
Solve for x taking p and q as conntants
  1 件のコメント
Dimitris Kalogiros
Dimitris Kalogiros 2018 年 9 月 23 日
I wonder whether your equation is
x^4-p*x^2+q =0
or if it is
x^2-p*x^2+q=0
Since, I thing that what you gave has no analytical solution if p,q are being considered as parameters.

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

回答 (2 件)

Bruno Luong
Bruno Luong 2018 年 9 月 23 日
roots([1,0,0,-p,q])

Basil C.
Basil C. 2018 年 9 月 24 日
Here is a better way to implement when you only have the equation given
syms x
%define the value of p and q
y=x^4-p*x+q;
C=double(coeffs(y,'All'));
answer=roots(C)

カテゴリ

Help Center および File ExchangeOrdinary Differential Equations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by