Unable to find explicit solution

6 次查看(过去 30 天)
I tried solving an equation as shown below, and I was constantly getting this error - "Warning: Unable to find explicit solution. For options, see help". I am not able to understand what else to try, I wish to solve for 'y' and I have values for the other parameters, vf, a, x , m and psi predefined. How do I rectify this error?
syms psi x y vf a m
psi = 0.1;
r = 0.3;
a = r;
m = 1;
x = linspace(-10*r,10*r);
eqn = psi == norm(vf)*(y+m*atan2(y,x+a)-m*atan2(y,x-a));
sol = solve(simplify(eqn),y,'Real', true,'IgnoreAnalyticConstraints', true) ;
  2 个评论
darova
darova 2020-6-14
Did you try vpasolve or fsolve? I think solve can't handle it, it's complicated
Try numerical approach
Walter Roberson
Walter Roberson 2020-6-14
vpasolve() cannot handle the situation because vf is not resolved.

请先登录,再进行评论。

回答(1 个)

Walter Roberson
Walter Roberson 2020-6-14
You are trying to solve for a single y value that satisfies all 100 equations simultaneously. That cannot work. You need to solve each of the equations independently:
syms psi x y vf a m
psi = 0.1;
r = 0.3;
a = r;
m = 1;
x = linspace(-10*r,10*r);
eqn = simplify(psi == norm(vf)*(y+m*atan2(y,x+a)-m*atan2(y,x-a)));
sol = arrayfun(@(EQN) solve(EQN,y,'Real', false,'IgnoreAnalyticConstraints', true), eqn, 'uniform', 0);
... This still will not be able to find the solutions, but that is because there is no solution for general vf

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by