How to solve a complicated algebraic equation with symbolic toolbox?

Hi guys,
In the following image there are some expression of some parameters.
I need to solve the equality deriving from expression (17), i.e. in order to get .
I tried to solve the problem by hand but it involves many substitutions and it is full of computations.
Is there a way to perform this task by using the symbolic toolbox with as little effort as possible?

 Akzeptierte Antwort

Either
delta_w = k*pi (k integer)
or
delta_w = acos(((p1*e2)^2 + (p2*e1)^2 - (p1-p2)^2)/(2*p1*p2*e1*e2))

4 Kommentare

Can you show me the code that allows you to get the second expression of your answer?
Here is the "code":
k2^2-k1*k3 = 0
-> (a*b)^2 - (b^2+c^2)*(a^2-c^2) = 0
-> c^2*(a^2-b^2-c^2) = 0
-> c= 0 or a^2-b^2-c^2 = 0
c = 0 -> dw = k*pi (k integer)
a^2-b^2-c^2 = 0
-> (p1-p2)^2 - (p1*e2*cos(dw)-p2*e1)^2 - (p1*e2*sin(dw))^2 = 0
-> (p1-p2)^2 -p1^2*e2^2*(cos^2(dw)+sin^2(dw)) + 2*p1*p2*e2*e2*cos(dw) - p2^2*e1^2 = 0
-> (p1-p2)^2 - p1^2*e2^2 * 1 + 2*p1*p2*e1*e2*cos(dw) - p2^2*e1^2 = 0
I think you can take it from here.
Here is MATLAB code:
syms p1 p2 e1 e2 dw
a = p1-p2;
b = p1*e2*cos(dw)-p2*e1;
c = -p1*e2*sin(dw);
k1 = b^2+c^2;
k2 = a*b;
k3 = a^2-c^2;
det = k2^2-k1*k3;
F = solve(det==0,dw)
Yes, sorry. I meant the MATLAB code! Thank you.
Since I don't have MATLAB available at the moment:
Do you get the same formula from MATLAB as the one from my hand calculation or
/ _____________________________________________________________\
| / / 2 2 2 2 2 2\ |
| / -\e1 *p2 - 2*e1*e2*p1*p2 + e2 *p1 - p1 + 2*p1*p2 - p2 / |
+/-2*atan| / ----------------------------------------------------------- |
| / 2 2 2 2 2 2 |
\\/ e1 *p2 + 2*e1*e2*p1*p2 + e2 *p1 - p1 + 2*p1*p2 - p2 /

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Mathematics finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2021a

Gefragt:

am 9 Mär. 2022

Bearbeitet:

am 9 Mär. 2022

Community Treasure Hunt

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

Start Hunting!

Translated by