How to Use SymPy to calculate Definite Integrals with Symbols of Constant?

  1. You haven’t declared a,b as symbols
  2. You need to write a*x. Leaving out the multiplication operator works only with numbers. Anything else would be ambiguous.
julia> integrate(a*x+b, (x, A, B))
   2            2        
  A ⋅a         B ⋅a      
- ──── - A⋅b + ──── + B⋅b
   2            2        
1 Like