Symbolize but the solutions number of the equation changed

1 view (last 30 days)
Screen Shot 2019-02-16 at 11.57.29 PM.png
To solve the det A ==0 equation, if I symbolize eta_yy, eta_xy..., I get q_sol as 4*1. But if I take eta_yx, eta_xy... as a number, I get q_sol as 6*1. Why is it?
Thank you in advance

Answers (1)

chirag rohit
chirag rohit on 16 Mar 2019
clc
clear all;
syms q
eta_yy = 2;
eta_yx = 3;
eta_xy = 4;
eta_xx = 2;
eta_zy = 4;
eta_zx = 5;
eta_yz = 6;
eta_xz = 3;
eta_zz = 5;
ky = 8;
kx = 7;
k0 = 2.5;
A2 = [eta_yy, -eta_yx; -eta_xy, eta_xx];
A1a = [-ky*eta_zy, ky*eta_zx; kx*eta_zy, -kx*eta_zx];
A1b = [-ky*eta_yz, ky*eta_yz; kx*eta_xz, -kx*eta_xz];
A1 = A1a + A1b;
A0a = [ky^2 * eta_zz, -kx * ky * eta_zz; -kx * ky * eta_zz, kx^2 * eta_zz];
A0b = [kx^2 * eta_yy - kx * ky * eta_yx, kx*ky*eta_yy - ky^2*eta_yx; ...
kx * ky * eta_xx - kx^2 * eta_xy, ky^2 * eta_xx - kx * ky * eta_xy];
A0 = A0a + A0b - k0^2*eye(2);
Am1 = [ky^2 * kx * eta_zx - kx^2 * ky * eta_zy, ky^3 * eta_zx - ky^2 * kx *eta_zy;...
kx^3 * eta_zy - kx^2 * ky * eta_zx, kx^2 * ky * eta_zy - ky^2 * kx * eta_zx];
A_mat = A2 * q^2 + A1 * q + A0 + Am1 * q^(-1);
% simplify(A_mat);
collect(det(A_mat),q);
q_sol = solve(det(A_mat)==0,q)
>> vpa(q_sol,4)
ans =
0.2184 - 10.71i
0.2184 + 10.71i
2.867
25.07
  1 Comment
chirag rohit
chirag rohit on 16 Mar 2019
Respected ma'am,
Here i have taken random values of eta_xx,.... And tried to solve eqation. I get q_sol as 4*1. In both ways i get q_sol as 4*1. If you are choosing some specified values for variables please mention.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!