Effacer les filtres
Effacer les filtres

Unable to find explicit solution

1 vue (au cours des 30 derniers jours)
Sanjana Singh
Sanjana Singh le 2 Juin 2020
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 commentaires
darova
darova le 14 Juin 2020
Did you try vpasolve or fsolve? I think solve can't handle it, it's complicated
Try numerical approach
Walter Roberson
Walter Roberson le 14 Juin 2020
vpasolve() cannot handle the situation because vf is not resolved.

Connectez-vous pour commenter.

Réponses (1)

Walter Roberson
Walter Roberson le 14 Juin 2020
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

Community Treasure Hunt

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

Start Hunting!

Translated by