MATLAB Answers

get several answers with solve

19 views (last 30 days)
pejhan stiff
pejhan stiff on 10 Jan 2021
Answered: John D'Errico on 10 Jan 2021
hi i want to have several answers for this eq: cos(x)*cosh(x)+1=0
but when i use this code :
i just get one answers


Sign in to comment.

Answers (1)

John D'Errico
John D'Errico on 10 Jan 2021
There is no analytical solution.
syms x
Warning: Unable to solve symbolically. Returning a numeric solution using vpasolve.
> In sym/solve (line 304)
ans =
So solve tells you that it used a numerical solver. That you want it to find all solutions is not that mathematically relavant, unless you are good with a magic wand.
You can use a numerical solver, starting from different start points, then collect all solutions found. But wanting the impossible only makes you a dreamer.


Sign in to comment.


Community Treasure Hunt

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

Start Hunting!

Translated by