How to find the roots of a non-polynomial equation in terms of symbolic variables ?

13 次查看(过去 30 天)
want to find the values of 'K' for which the function (D) becomes zero. 'L' and 'a' are the constants. Code:
syms A B L K a
D = [cosh(K*L)-cos(K*L), sinh(K*L)-sin(K*L); sinh(K*L)+sin(K*L)+K*a*L*(cosh(K*L)+cos(K*L)), cosh(K*L)-cos(K*L)+K*a*L*(sinh(K*L)+sin(K*L))];
d = det(D)
fzero(@(K) d, 10)
Error using fzero (line 309) Function value at starting guess must be finite and real.
  1 个评论
Denel
Denel 2024-8-7,20:26
Have you tried different starting values for the fzero() function? The error-message states that your starting value isn't valid, since the function's value in that point (10), is probably infinite or complex.

请先登录,再进行评论。

回答(1 个)

Walter Roberson
Walter Roberson 2024-8-7,22:06
The Symbolic toolbox is not able to solve such equations.
syms a A B K L real
D = [cosh(K*L)-cos(K*L), sinh(K*L)-sin(K*L); sinh(K*L)+sin(K*L)+K*a*L*(cosh(K*L)+cos(K*L)), cosh(K*L)-cos(K*L)+K*a*L*(sinh(K*L)+sin(K*L))];
d = det(D)
d = 
solve(d, K)
Warning: Unable to find explicit solution. For options, see help.
ans = Empty sym: 0-by-1
dexp = rewrite(d, 'exp')
dexp = 
solve(dexp, K)
Warning: Unable to find explicit solution. For options, see help.
ans = Empty sym: 0-by-1
dexpsimp = simplify(dexp)
dexpsimp = 
solve(dexpsimp, K)
Warning: Unable to find explicit solution. For options, see help.
ans = Empty sym: 0-by-1

Community Treasure Hunt

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

Start Hunting!

Translated by