Skip to content

Instantly share code, notes, and snippets.

@gagern
Created May 14, 2021 11:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gagern/0c2ae2a9dedf98f4c75432ce12502165 to your computer and use it in GitHub Desktop.
Save gagern/0c2ae2a9dedf98f4c75432ce12502165 to your computer and use it in GitHub Desktop.
https://math.stackexchange.com/a/4134048/35416
0 = (4*h^2 - 8*h*R + 4*R^2)*N^4
+ (-4*b^2*h - 4*e^2*h + 4*f^2*h - 12*h^3 + 4*b^2*R + 4*e^2*R - 4*f^2*R + 36*h^2*R - 40*h*R^2 + 16*R^3)*N^3
+ (b^4 + 2*b^2*e^2 + e^4 + 2*b^2*f^2 - 2*e^2*f^2 + f^4 + 16*b*e*f*h + 10*b^2*h^2 + 14*e^2*h^2 - 10*f^2*h^2 + 13*h^4 - 16*b*e*f*R - 20*b^2*h*R - 28*e^2*h*R + 20*f^2*h*R - 52*h^3*R + 8*b^2*R^2 + 16*e^2*R^2 - 12*f^2*R^2 + 88*h^2*R^2 - 72*h*R^3 + 24*R^4)*N^2
+ (-8*b*e^3*f - 2*b^4*h - 6*e^4*h - 4*b^2*f^2*h - 2*f^4*h - 24*b*e*f*h^2 - 8*b^2*h^3 - 12*e^2*h^3 + 8*f^2*h^3 - 6*h^5 + 2*b^4*R + 6*e^4*R + 4*b^2*f^2*R + 2*f^4*R + 48*b*e*f*h*R + 24*b^2*h^2*R + 36*e^2*h^2*R - 24*f^2*h^2*R + 30*h^4*R - 24*b*e*f*R^2 - 20*b^2*h*R^2 - 44*e^2*h*R^2 + 28*f^2*h*R^2 - 68*h^3*R^2 + 4*b^2*R^3 + 20*e^2*R^3 - 12*f^2*R^3 + 84*h^2*R^3 - 56*h*R^4 + 16*R^5)*N
+ (b^4*e^2 - 2*b^2*e^4 + e^6 + 2*b^2*e^2*f^2 + 2*e^4*f^2 + e^2*f^4 + 8*b*e^3*f*h + b^4*h^2 + 3*e^4*h^2 + 2*b^2*f^2*h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2*h^2*R + 30*h^4*R - 24*b*e*f*R^2 - 44*b^2*h*R^2 - 20*e^2*h*R^2 + 28*f^2*h*R^2 - 68*h^3*R^2 + 20*b^2*R^3 + 4*e^2*R^3 - 12*f^2*R^3 + 84*h^2*R^3 - 56*h*R^4 + 16*R^5)*N
+ (b^6 - 2*b^4*e^2 + b^2*e^4 + 2*b^4*f^2 + 2*b^2*e^2*f^2 + b^2*f^4 + 8*b^3*e*f*h + 3*b^4*h^2 + e^4*h^2 + 2*e^2*f^2*h^2 + f^4*h^2 + 8*b*e*f*h^3 + 3*b^2*h^4 + 2*e^2*h^4 - 2*f^2*h^4 + h^6 - 8*b^3*e*f*R - 6*b^4*h*R - 2*e^4*h*R - 4*e^2*f^2*h*R - 2*f^4*h*R - 24*b*e*f*h^2*R - 12*b^2*h^3*R - 8*e^2*h^3*R + 8*f^2*h^3*R - 6*h^5*R + 5*b^4*R^2 - 2*b^2*e^2*R^2 + e^4*R^2 - 2*b^2*f^2*R^2 + 2*e^2*f^2*R^2 + f^4*R^2 + 24*b*e*f*h*R^2 + 22*b^2*h^2*R^2 + 10*e^2*h^2*R^2 - 14*f^2*h^2*R^2 + 17*h^4*R^2 - 8*b*e*f*R^3 - 20*b^2*h*R^3 - 4*e^2*h*R^3 + 12*f^2*h*R^3 - 28*h^3*R^3 + 8*b^2*R^4 - 4*f^2*R^4 + 28*h^2*R^4 - 16*h*R^5 + 4*R^6)
@fahdmotlak
Copy link

fahdmotlak commented May 15, 2021

I entered some input data then i drew them on CAD software as in the image here:
[b=-20, e=14, f=15, h=42.58321186, R=12]
for these data one of the solutions should be 23.47653246 as in this image

CAD

Then i used Excel to calculate the polynomials as in the image here:

Screenshot 2021-05-15 062847

Then i used this online calculator https://keisan.casio.com/exec/system/1181809416 to solve for the possible values and none of the 8 possible solutions matched the drawn one.

@gagern
Copy link
Author

gagern commented May 16, 2021

@fahdmotlak wrote:

[b=-20, e=14, f=15, h=42.58321186, R=12] for these data one of the solutions should be 23.47653246 as in this image

You have a sign mistake there. In your Math Stack Exchange post you have the vertical line at x = −b but here you make b itself negative. At that point the numbers you picked no longer match the picture.

With b = 20 you get 3741.331390695 N⁴ - 406267.2081118 N³ + 20070435.52597 N² - 480024662.9033 N + 4327767406.618 = 0 and that online calculator will include the value you expect.

@fahdmotlak
Copy link

This is true, thank you very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment