- You haven’t declared
a,bas symbols - 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