Solving a complicated symbolic equation
1 次查看(过去 30 天)
显示 更早的评论
Hello,
im trying to solve the following equation, A=B*x*sinh(x) (A and B are known constants) using symbolic toolbox:
syms x;
A=3;
B=9;
equation=A==B*x*sinh(x);
solution=solve(equation,x)
however i cannot find a solution.
i've tried using vpasolve as well but it still doesnt work.
will appreciate any advice.
1 个评论
John D'Errico
2023-6-2
solve fails, because there is no algebraic solution to your problem. However, both fzero and vpasolve will work, and the two answers you have gotten tell you that.
We cannot know why you think vpasolve failed, because we do not see what you tried. But vpasolve does not even desperately need a starting point. (It uses zero as I recall by default.) But a starting point is always a good idea.
syms x;
A=3;
B=9;
equation=A==B*x*sinh(x);
solution=vpasolve(equation,x)
回答(2 个)
Pramil
2023-6-2
You can do the following :
syms x;
A = 3;
B = 9;
solution = vpasolve(B*x*sinh(x)==A, x, 1)
The vpasolve function allows you to specify a starting value for the numerical solver, in this case, the starting value is 1. The output of this code will give you a single numerical value for x
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Symbolic Math Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!