This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Nov 18th, 2012  |  syntax: None  |  size: 1.27 KB  |  views: 15  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. from sympy import symbols,solve
  2.  
  3. [n_,Re_,p_,i_,J2_,Pe_] = symbols(['n_','Re_','p_','i_','J2_','Pe_'])
  4.  
  5. del_ss = -((3*n_*(Re_**2)*J2_/(4*(p_**2)))*(4-5*(sin(i_)**2)))-((3*n_*(Re_**2)*J2_/(2*(p_**2)))*cos(i_))-((2*pi)/Pe_)
  6.  
  7. pprint(solve(del_ss,i_))
  8.        
  9. Traceback (most recent call last):
  10.   File "<stdin>", line 1, in <module>
  11.   File "C:Python27libsite-packagesspyderlibwidgetsexternalshellsitecustomize.py", line 479, in runfile
  12.     execfile(filename, namespace)
  13.   File "C:UsersNathanPythonsympy_test_1.py", line 22, in <module>
  14.     pprint(solve(del_ss,i_))
  15.   File "C:Python27libsite-packagessympysolverssolvers.py", line 484, in solve
  16.     solution = _solve(f, *symbols, **flags)
  17.   File "C:Python27libsite-packagessympysolverssolvers.py", line 700, in _solve
  18.     soln = tsolve(f_num, symbol)
  19.   File "C:Python27libsite-packagessympysolverssolvers.py", line 1143, in tsolve
  20.     "(tsolve: at least one Function expected at this point")
  21. NotImplementedError: Unable to solve the equation(tsolve: at least one Function expected at this point
  22.        
  23. from sympy import symbols,solve,sin,cos,pi
  24.  
  25. [n_,Re_,p_,ci_,J2_,Pe_] = symbols(['n_','Re_','p_','ci_','J2_','Pe_'])
  26.  
  27. del_ss = -((3*n_*(Re_**2)*J2_/(4*(p_**2)))*(4-5*(1-ci_**2)))-((3*n_*(Re_**2)*J2_/(2*(p_**2)))*ci_)-((2*pi)/Pe_)
  28.  
  29. pprint(solve(del_ss,ci_))
clone this paste RAW Paste Data