I want to solve a determinant of a matrix having polynomials as elements

Suppose I have a matrix A[6x6].I it have elements with 'x' as variable like A(1,1)=x^2-3 , A(1,2)=5*x^3-2*x^3+3 etc. So how should I solve these?? When I tried syms x for all writing all elements,it said inside a matrix only double should be used. My ultimate aim is to solving det(A)=0; and those polynomials are very big(solutions of sextic equation).
someone please help me

Answers (2)

No. YOU CAN use symbolic terms in a matrix. Why not show what you have tried?
syms x
A = [x^2 , 2;x, (x+1)^3];
vpasolve(det(A) == 0)
ans =
-2.0
0
0.54368901269207636157085597180175
- 0.77184450634603818078542798590087 - 1.115142508039937359745764636315i
- 0.77184450634603818078542798590087 + 1.115142508039937359745764636315i
No problems, so I could only make wild conjectures about what you might have done wrong.
Note that an exact solution will be impossible to achieve in general, since your problem will be of too high a polynomial order.

1 Comment

  • _ * _ _ thanks for your answer :D__*_*
clear all
clc
syms y
a=1;
b=3;
% x=solve('a*x^2+b*x+y') I got sulution using this.But roots() is not working with a sym inside
x =[-(b + (b^2 - 4*a*y)^(1/2))/(2*a);-(b - (b^2 - 4*a*y)^(1/2))/(2*a)];
%I want to make a matrix of A=[x(1) x(2);x(1)^2 x(2)^2] I can't write directly.So I used loop as below
for i=1:2
A(1,i)=x(i);
A(1,i)=x(i)^2;
end
vpasolve(det(A) == 0)

Sign in to comment.

Asked:

on 19 Dec 2015

Answered:

on 20 Dec 2015

Community Treasure Hunt

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

Start Hunting!