Warning: Cannot solve symbolically. Returning a numeric approximation instead.

Hello, I was trying to solve equations with solve, The code is attached. I was trying to find out the values of x
clear; clc;
syms x, l1=0.5; l2=0.5;
A=(cosh(x*l1)-cos(x*l1))/(sinh(x*l1)-sin(x*l1)); B=(0.5)*(cosh(x*l1)+ cos(x*l1)-A*(sinh(x*l1)+sin(x*l1))); C=((-1+cosh(x*l2)*cos(x*l2)-sinh(x*l2)*sin(x*l2))/(sinh(x*l2)*cos(x*l2)-cosh(x*l2)*sin(x*l2)))*B; D=((1-cos(x*l2)*cosh(x*l2)-sinh(x*l2)*sin(x*l2))/(sin(x*l2)*cosh(x*l2)-cos(x*l2)*sinh(x*l2)))*B;
SS = solve(C+D+sinh(x*l1)+sin(x*l1)-A*cosh(x*l1)+A*cos(x*l1)==0,x);

 채택된 답변

John D'Errico
John D'Errico 2017년 9월 15일
So, what does the warning message say? It is not an error. Merely a statement of fact.
Surely there are some equations that have no analytical solution. It is easy to write one. In fact, you did exactly that. Instead, MATLAB realized that it was still possible to find a solution using a numerical root finder (so solve then calls vpasolve). Therefore, it did so, telling you what it did. This is because a root finder will find only ONE solution. And the solution it does find may not always be the solution (if multiple solutions exist) that you want. You can control that by use of the starting value that vpasolve uses.
So go back and look at your equation. Come on. Look carefully. Do you really, honestly think an analytical solution exists? Thus, something with square roots and exponents in it, etc? Nope. Not gonna happen.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

질문:

2017년 9월 15일

답변:

2017년 9월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by