## 13 Reputation

14 years, 78 days

## Thanks Dr. Israel.  You're right, I...

Thanks Dr. Israel.  You're right, I forgot to change theta to p, whoops!  I wish I could change it.

I prefer to avoid imaginary values in the factorization, as the goal of the previous step in the worksheet was to separate the real and imaginary components.   I'd like to see some sort of polynomial-style factoring (even if terms in the numerator and denominator don't cancel).

For example, the denominator may be factored to

(x12+x32+y12+y32)(x22+x42+y22+y42) - 4(x1x3+y1y3)(x2x4+y2y4) + 2(x1y3-x3y1)(x42+y42-x22-y22) + 2(x2y4-x4y2)(x12+y12-x32-y32)

although this was done by hand.  If I could further simplify this, and perform something similar in the numerator, that would be nice.  My best idea is to try some expected field extensions in the factor command, as you suggested.

## Thanks Dr. Israel.  You're right, I...

Thanks Dr. Israel.  You're right, I forgot to change theta to p, whoops!  I wish I could change it.

I prefer to avoid imaginary values in the factorization, as the goal of the previous step in the worksheet was to separate the real and imaginary components.   I'd like to see some sort of polynomial-style factoring (even if terms in the numerator and denominator don't cancel).

For example, the denominator may be factored to

(x12+x32+y12+y32)(x22+x42+y22+y42) - 4(x1x3+y1y3)(x2x4+y2y4) + 2(x1y3-x3y1)(x42+y42-x22-y22) + 2(x2y4-x4y2)(x12+y12-x32-y32)

although this was done by hand.  If I could further simplify this, and perform something similar in the numerator, that would be nice.  My best idea is to try some expected field extensions in the factor command, as you suggested.

## correct, sol3 was hindered by round off...

@acer, I tested the solution #3 with evalf[100], and now it performs as well as the others...and I thought I could easily discount it, haha!  No such luck.

## correct, sol3 was hindered by round off...

@acer, I tested the solution #3 with evalf[100], and now it performs as well as the others...and I thought I could easily discount it, haha!  No such luck.

## tests...

@Markiyan Hirnyk, I ported the solutions into Matlab, and tested matrices of simulated x1, x2, y1, and y2 values.  The 3 solutions discussed above showed varied abiliity to converge on the correct M, a, b, and phi values. 'Solution 1' had the most success, only failing when x1, x2, y1, or y2 = 0.  But the other solutions had comparable success when I added gaussian white noise to x1, x2, y1, and y2.

I've attached a file demonstrating an instability in 'Solution 3' at [x1 = -17.275, x2 = -180.93, y1 = 238.59, y2 = -156.49].  Note that 'Solution 3' changes each time the worksheet is re-exexuted!!

## tests...

@Markiyan Hirnyk, I ported the solutions into Matlab, and tested matrices of simulated x1, x2, y1, and y2 values.  The 3 solutions discussed above showed varied abiliity to converge on the correct M, a, b, and phi values. 'Solution 1' had the most success, only failing when x1, x2, y1, or y2 = 0.  But the other solutions had comparable success when I added gaussian white noise to x1, x2, y1, and y2.

I've attached a file demonstrating an instability in 'Solution 3' at [x1 = -17.275, x2 = -180.93, y1 = 238.59, y2 = -156.49].  Note that 'Solution 3' changes each time the worksheet is re-exexuted!!

## subsindets works great...

Fantastic! Thank you.

## subsindets works great...

Fantastic! Thank you.

## Elaboration of my question...

@Markiyan Hirnyk , enter my system of equations, and then try the following:

1) sol := eliminate({x1 = X1, x2 = X2, y1 = Y1, y2 = Y2}, {M, a, b, phi}):
sol1 := allvalues(simplify(eval(M, sol[1]), size));

2) sol2 := allvalues(solve({X1 = x1, X2 = x2, Y1 = y1, Y2 = y2}, {M, a, b, phi}, AllSolutions));

3) sol3 := allvalues(solve({x1 = M*(c-a*c)/(1-b*(c^2-s^2)), x2 = M*(c+a*s)/(1+2*b*c*s), y1 = M*(s+a*s)/(1-b*(c^2-s^2)), y2 = M*(s+a*c)/(1+2*b*c*s), c^2+s^2 = 1}, {M, a, b, c, s}));

Each 'method' results in an apparently different '4plet' solution.  I assume that the 4plets may be derived from one another; but to do so is beyond my expertise.  I will attempt to use Matlab to load matrices of data to test their relative response.  What do you think?

## Elaboration of my question...

@Markiyan Hirnyk , enter my system of equations, and then try the following:

1) sol := eliminate({x1 = X1, x2 = X2, y1 = Y1, y2 = Y2}, {M, a, b, phi}):
sol1 := allvalues(simplify(eval(M, sol[1]), size));

2) sol2 := allvalues(solve({X1 = x1, X2 = x2, Y1 = y1, Y2 = y2}, {M, a, b, phi}, AllSolutions));

3) sol3 := allvalues(solve({x1 = M*(c-a*c)/(1-b*(c^2-s^2)), x2 = M*(c+a*s)/(1+2*b*c*s), y1 = M*(s+a*s)/(1-b*(c^2-s^2)), y2 = M*(s+a*c)/(1+2*b*c*s), c^2+s^2 = 1}, {M, a, b, c, s}));

Each 'method' results in an apparently different '4plet' solution.  I assume that the 4plets may be derived from one another; but to do so is beyond my expertise.  I will attempt to use Matlab to load matrices of data to test their relative response.  What do you think?

## they all appear SYMBOLICALLY different...

@Markiyan Hirnyk , exactly!  While the symbolic expressions for each method all appear different, upon substitution of the sample x1,x2,y1,y2 values you've chosen, they all solve the problem.

Which is why I wonder, are they all variations of the same solution, or are they unique?  I am inclined to believe the former, although proving it requires clever simplification, or rigorous testing of all possible substitution values.

## they all appear SYMBOLICALLY different...

@Markiyan Hirnyk , exactly!  While the symbolic expressions for each method all appear different, upon substitution of the sample x1,x2,y1,y2 values you've chosen, they all solve the problem.

Which is why I wonder, are they all variations of the same solution, or are they unique?  I am inclined to believe the former, although proving it requires clever simplification, or rigorous testing of all possible substitution values.

## a plethora of monster solutions...

@Markiyan Hirnyk , nice!  Along with the generic solve method, and the eliminate method, I now have 3 different sets of 4 long solutions (interesting that they all appear different).  I am going to try coding them into Matlab for direct application to my data; it's too bad Matlab doesn't employ a Maple symbolic toolbox, it'll be tricky to avoid typos!  Thanks again for all your effort.

 1 2 3 Page 1 of 3
﻿