Syntax error in mathematical equation (pyflakes E)

Asked

Viewed 280 times

-1

The code below, written in python, has syntax error in the equation Ff. I searched for problems related to closing the parentheses, rewrote the equation and still get the error message. While hovering over the error identifier in the code appears the message Invalid syntax (pyflakes E).

import sympy
import math as m
E=210*10**9 
A=10**(-4)  
h=.1        
l=1.        
u=sympy.Symbol('u')

Ff=-2*E*A*((m.sqrt(((h-u)**2)-l**2)-m.sqrt((h**2)-l**2))(h-u)((h**2)*m.sqrt((h**2)-2*h*u+(l**2)+u**2)+(l**2)*m.sqrt((h**2)-2*h*u+(l**2)+u**2))m.sqrt((h**2)-l**2))/((h**6)-2*(h**5)*u+(h**4)*(u**2)+(l**2)*(h**4)-(l**4)*(h**2)+2*(l**4)*h*u-(l**6)-(l**4)*u**2)

1 answer

0


Python cannot work with an expression of this size, however, you can break it down by parts into variables and put it together later.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.