Thank you so much, for the answer. I have to get the solutions to plot 
them. The solutions represent the critical speed of a shaft and there's no 
other way.  Other students are using other software for their project like 
Maple or Mathematica, which they cause less problem. I was using python and 
I've written around 50 pages of code in jupyter notebook and i get stuck in 
this last calculation. Using Sagemath i've solved the equation and then 
i've copied into my python code.

Il giorno venerdì 7 giugno 2019 02:21:52 UTC+2, Oscar ha scritto:
>
> SymPy will find the solution eventually I think. 
>
> This is a polynomial of order 8 having only even powers so with a 
> substitution omega**2 -> x it's a quartic in x with complicated 
> symbolic coefficients. The general formula for a quartic is horrendous 
> and in this case your coefficients are already large expressions. 
>
> What this means is that the solution will take a while to compute and 
> will probably be too complicated to be useful when done anyway. Really 
> complicated analytic expressions can be difficult to use without 
> substituting numeric values in and it's much easier to find the roots 
> if you substitute the numbers in first. 
>
> I'm not sure why it is so slow though. You can get to the solutions 
> for omega^2 like this: 
>
> In [39]: coeffs = Poly(omega_nf_eq.rhs.subs(omega, sqrt(x)), 
> x).coeffs() 
>
> In [40]: a, b, c, d, e = symbols('a, b, c, d, e') 
>
> In [41]: p = Poly(a*x**4+b*x**3+c*x**2+d*x+e, x) 
>
> In [42]: rs = solve(p, x) 
>
> Print the first root: 
>
> In [43]: rs[0].subs(zip((a,b,c,d,e), coeffs)) 
>
> (output omitted as it's long and complicated) 
>
>
> My suggestion is to consider why you need the solutions to this 
> equation. There may be a better way to reach your actual end goal then 
> getting the solutions in explicit analytic form. 
>
> -- 
> Oscar 
>
> On Fri, 7 Jun 2019 at 00:13, pull_over93 <[email protected] 
> <javascript:>> wrote: 
> > 
> > Hi everybody, I'm tring to solve this equation without succes: 
> omega_nf_eq = 0 
> > 
> > import sympy as sym 
> > 
> m,J_d,J_p,y,Y,omega,Omega,phi,Phi,z,Z,theta,Theta,k_yy,k_zz,k_phiphi,k_yphi,k_ztheta,k_thetatheta,plane_xy1,plane_xy2,plane_xz1,plane_xz2
>  
> = 
> sym.symbols('m,J_d,J_p,y,Y,omega,Omega,phi,Phi,z,Z,theta,Theta,k_yy,k_zz,k_phiphi,k_yphi,k_ztheta,k_thetatheta,plane_xy1,plane_xy2,plane_xz1,plane_xz2',
>  
> real  = True) 
> > t, omega_nf = sym.symbols('t, omega_nf', real = True) 
> > 
> > omega_nf_eq = sym.Eq(omega_nf, -J_d**2*k_yy*k_zz*omega**4 + 
> 0.382*J_d**2*k_yy*omega**6 + 0.382*J_d**2*k_zz*omega**6 - 
> 0.145924*J_d**2*omega**8 + J_d*k_phiphi*k_yy*k_zz*omega**2 - 
> 0.382*J_d*k_phiphi*k_yy*omega**4 - 0.382*J_d*k_phiphi*k_zz*omega**4 + 
> 0.145924*J_d*k_phiphi*omega**6 + J_d*k_thetatheta*k_yy*k_zz*omega**2 - 
> 0.382*J_d*k_thetatheta*k_yy*omega**4 - 0.382*J_d*k_thetatheta*k_zz*omega**4 
> + 0.145924*J_d*k_thetatheta*omega**6 - J_d*k_yphi**2*k_zz*omega**2 + 
> 0.382*J_d*k_yphi**2*omega**4 - J_d*k_yy*k_ztheta**2*omega**2 + 
> 0.382*J_d*k_ztheta**2*omega**4 + J_p**2*Omega**2*k_yy*k_zz*omega**2 - 
> 0.382*J_p**2*Omega**2*k_yy*omega**4 - 0.382*J_p**2*Omega**2*k_zz*omega**4 + 
> 0.145924*J_p**2*Omega**2*omega**6 - k_phiphi*k_thetatheta*k_yy*k_zz + 
> 0.382*k_phiphi*k_thetatheta*k_yy*omega**2 + 
> 0.382*k_phiphi*k_thetatheta*k_zz*omega**2 - 
> 0.145924*k_phiphi*k_thetatheta*omega**4 + k_phiphi*k_yy*k_ztheta**2 - 
> 0.382*k_phiphi*k_ztheta**2*omega**2 + k_thetatheta*k_yphi**2*k_zz - 
> 0.382*k_thetatheta*k_yphi**2*omega**2 - k_yphi**2*k_ztheta**2) 
> > 
> > solution = sym.solve(omega_nf_eq.rhs, omega, dict = True , force=True, 
> manual=True, set=True) 
> > 
> > Even after half an hour, sympy is unable to give a solution. 
> > I also tried sage math, but I had the same failure. 
> > Suggestions? 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "sympy" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to [email protected] <javascript:>. 
> > To post to this group, send email to [email protected] 
> <javascript:>. 
> > Visit this group at https://groups.google.com/group/sympy. 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sympy/a4ebc67b-3e40-448b-b6a3-5500f6b9dab3%40googlegroups.com.
>  
>
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/7de41a77-c4ea-4554-9b0c-be20704d098e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to