Clear Filters
Clear Filters

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

13 views (last 30 days)
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 Comment
Denel
Denel on 7 Aug 2024 at 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.

Sign in to comment.

Answers (1)

Walter Roberson
Walter Roberson on 7 Aug 2024 at 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!