Unable to find explicit solution

193 次查看(过去 30 天)
Hello,
I am trying to solve an equation for one variable but I get this error message:
Warning: Unable to find explicit solution. For options, see help.
> In sym/solve (line 317)
In untitled (line 15)
sol =
Empty sym: 0-by-1
>>
I searched but could'nt find any solution. I couldn't even understand what the problem is. You can see my code below.
Thanks in advance.
syms t
b=2*t+14.3;
w=3*t+21.45;
A=(w*b)-(w-t)*(b-2*t);
rc=(w*b)*450-(w-t)*(b-2*t)*(450+t/2)/A;
rn=A/(b*log((450-w/2+t)/(450-w/2))+2*w*log((450+w/2)/(450-w/2+t)));
E=rc-rn;
ro=450+w/2;
ri=450-w/2;
Ay=-40260.604300;
M1=56124.523326;
sol=solve((Ay/A)+(M1*(ro-rn))/(A*E*ro)==116, t)
  1 个评论
Torsten
Torsten 2022-1-19
编辑:Torsten 2022-1-19
Not all equations can explicitly be solved.
Use "vpasolve" instead of "solve".
If this doesn't yield a result, plot
(Ay/A)+(M1*(ro-rn))/(A*E*ro)-116
for a certain t-interval to see whether a zero really exists.

请先登录,再进行评论。

回答(3 个)

Yongjian Feng
Yongjian Feng 2022-1-19
This equation might not even have a solution. Try to plot it:
syms t
b=2*t+14.3;
w=3*t+21.45;
A=(w*b)-(w-t)*(b-2*t);
rc=(w*b)*450-(w-t)*(b-2*t)*(450+t/2)/A;
rn=A/(b*log((450-w/2+t)/(450-w/2))+2*w*log((450+w/2)/(450-w/2+t)));
E=rc-rn;
ro=450+w/2;
ri=450-w/2;
Ay=-40260.604300;
M1=56124.523326;
x = 1:100;
y = feval(matlabFunction((Ay/A)+(M1*(ro-rn))/(A*E*ro)), x);
plot(x, y)
It looks like when t goes up, (Ay/A)+(M1*(ro-rn))/(A*E*ro)) only goes up from negative to 0. Not sure it will ever reach 116.
  2 个评论
Yongjian Feng
Yongjian Feng 2022-1-19
Try vpasolve as recommended by Torsten above, your equation results in empty solution. Most likely there is not solution for it.
If you plot, you can see (Ay/A)+(M1*(ro-rn))/(A*E*ro)) is always negative. It might never reach 116 as you want.
sol=vpasolve((Ay/A)+(M1*(ro-rn))/(A*E*ro)==0, t) % this gives empty solution. This equation never reaches positive
sol=vpasolve((Ay/A)+(M1*(ro-rn))/(A*E*ro)==-1, t) % this gives 77.287
Yongjian Feng
Yongjian Feng 2022-1-20
Walter is right. I forgot about t<0 range.
If you plot -100:100, you can see most likely there shall be only one solution.

请先登录,再进行评论。


Walter Roberson
Walter Roberson 2022-1-19
编辑:Walter Roberson 2022-1-19
If you look carefully at the graph, you can see a couple of discontinuities at negative t values.
At first I thought it was a simple case of the system having non-zero imaginary components in some ranges, but it turns out that there are some steep +/- infinities being generated -- and each of those is an opportunity for a solution.
I saw at least one other candidate stretch for a solution between t = 0 and t = -10
syms t
b=2*t+14.3;
w=3*t+21.45;
A=(w*b)-(w-t)*(b-2*t);
rc=(w*b)*450-(w-t)*(b-2*t)*(450+t/2)/A;
rn=A/(b*log((450-w/2+t)/(450-w/2))+2*w*log((450+w/2)/(450-w/2+t)));
E=rc-rn;
ro=450+w/2;
ri=450-w/2;
Ay=-40260.604300;
M1=56124.523326;
eqn = (Ay/A)+(M1*(ro-rn))/(A*E*ro) == 116
eqn = 
sol=solve(eqn, t)
Warning: Unable to find explicit solution. For options, see help.
sol = Empty sym: 0-by-1
string(lhs(eqn) - rhs(eqn))
ans = "5533375321142303/(137438953472*((143*t)/5 - (2*t + 143/10)*(3*t + 429/20) + 61347/200)) - ((23141087250120879*t)/274877906944 + (7713695750040293*((143*t)/5 - (2*t + 143/10)*(3*t + 429/20) + 61347/200))/(137438953472*(log((t/2 - 17571/40)/((3*t)/2 - 17571/40))*(2*t + 143/10) + log(-((3*t)/2 + 18429/40)/(t/2 - 17571/40))*(6*t + 429/10))) + 142155698977492559697/5497558138880)/(((3*t)/2 + 18429/40)*(((143*t)/5 - (2*t + 143/10)*(3*t + 429/20) + 61347/200)/(log((t/2 - 17571/40)/((3*t)/2 - 17571/40))*(2*t + 143/10) + log(-((3*t)/2 + 18429/40)/(t/2 - 17571/40))*(6*t + 429/10)) + 450*(2*t + 143/10)*(3*t + 429/20) + ((t/2 + 450)*((143*t)/5 + 61347/200))/((143*t)/5 - (2*t + 143/10)*(3*t + 429/20) + 61347/200))*((143*t)/5 - (2*t + 143/10)*(3*t + 429/20) + 61347/200)) - 116"
vpasolve(eqn, [-7.985, -7.98])
ans = 

Alex Sha
Alex Sha 2022-1-20
One solution seems to be:
t: -8.33315732250827

类别

Help CenterFile Exchange 中查找有关 Calculus 的更多信息

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by