1

I wrote a program:

import sympy as sp
# Define symbols
l, alpha, x, gamma, r, theta, beta, v = sp.symbols('l alpha x gamma r theta beta v')
c = 2.99792458 * 10**8
# Define the equation
lhs = l * sp.sin(beta)
rhs = sp.sqrt((l * alpha + x * gamma - r * theta) * sp.sqrt(1 - v**2 / c**2)) * \
 sp.sqrt((l * alpha - x * gamma + r * theta) / sp.sqrt(1 - v**2 / c**2)) / alpha
equation = sp.Eq(lhs, rhs)
# Solve the equation for v
solution = sp.solve(equation, v)
# Print the solution
print("Solutions for v:")
for sol in solution:
 print(sol)

It does not print any solutions to ( v ), whereas Mathematica does indicate that there are solutions to ( v ):

v -> (\[Sqrt](-8.98755*10^16 l^2 \[Alpha]^2 + 8.98755*10^16 x^2 \[Gamma]^2 - 1.79751*10^17 r x \[Gamma] \[Theta] + 8.98755*10^16 r^2 \[Theta]^2 + 
8.98755*10^16 l^2 \[Alpha]^2 Sin[\[Beta]]^2))/(Sqrt[-1. l^2 \[Alpha]^2 + x^2 \[Gamma]^2 - 2.r x \[Gamma] \[Theta] + r^2 \[Theta]^2 + l^2 \[Alpha]^2 Sin[\[Beta]]^2])

Should Mathematica be corrected, or should we update the SymPy library to account for this? The program runs well, but it does not output the same solution that Mathematica does.

ti7
20.1k8 gold badges50 silver badges87 bronze badges
asked Aug 26, 2024 at 22:50
5
  • 2
    Questions: 1. Did you write your equation correctly? Because if I manually simplify the RHS of your equation, v goes away. 2. What assumptions are there on symbols? Commented Aug 27, 2024 at 7:06
  • Yes, the equation is written correctly. The mathematica input is best writen as: Solve[l Sin[[Beta]] == ( Sqrt[(l [Alpha] + x [Gamma] - r [Theta]) Sqrt[ 1 - v^2/(2.99792458*10^8)^2]] Sqrt[(l \[Alpha] - x \[Gamma] + r \[Theta])/Sqrt[ 1 - v^2/(2.99792458*10^8)^2]])/[Alpha], v], which you can copy/paste directly into mathematica. Take the Reduce in Mathematica, i.e. Reduce[l Sin[[Beta]] == ( Sqrt[(l [Alpha] + x [Gamma] - r [Theta]) Sqrt[1 - v^2/(c)^2]] Sqrt[(l [Alpha] - x [Gamma] + r [Theta])/Sqrt[ 1 - v^2/(c)^2]])/[Alpha], v] for the real analysis Commented Aug 30, 2024 at 16:01
  • You are correct about manually canceling. We demonstrate this by writing: Sqrt[-q^2 + 2 q s - s^2 + l^2 [Alpha]^2]/[Alpha] == ( Sqrt[-(q - s - l [Alpha]) ] Sqrt[(q - s + l [Alpha])])/[Alpha] However, for some reason, Mathematica outputs a solution to the equation for v, and the most suspicious part about it is that it only works when using the speed of light in scientific notation. Commented Aug 30, 2024 at 16:04
  • Mathematica is closed source and has not responded to inquiries about this matter in a professional manner, thus there is no peer review for this solution. That's why I was trying to use Sympy to find another way of verifying the solution, but to no avail. Commented Aug 30, 2024 at 16:05
  • As far as interpreting meaning for the symbols, Latin letters, x, l, and r represent distances of arc lengths and Greek letters represent angles of those arc lengths. v represents velocity in the Lorentz coefficient, which in this equation ought cancel out with itself, and the solution to v given by mathematica is therefore a kind of algebraic-geometric velocity embedded as a hidden dimension. You can see the proof that it fits formally with conceptions of instantaneous and average velocity here: zenodo.org/records/7911884 and here: zenodo.org/records/7272772 Commented Aug 30, 2024 at 16:13

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.