Repository: sympy/sympy

Issue:
Eq.integrate doesn't evaluate the integral
```
>>> Eq(x, y).integrate(x)
Eq(Integral(x, x), Integral(y, x))
```

The integrals should actually be evaluated. 

Discussion:

Patch:
diff --git a/sympy/integrals/integrals.py b/sympy/integrals/integrals.py
index 8f2d302e48..99a558164b 100644
--- a/sympy/integrals/integrals.py
+++ b/sympy/integrals/integrals.py
@@ -1456,17 +1456,21 @@ def integrate(*args, **kwargs):
     Integral, Integral.doit
 
     """
-    meijerg = kwargs.pop('meijerg', None)
-    conds = kwargs.pop('conds', 'piecewise')
-    risch = kwargs.pop('risch', None)
-    manual = kwargs.pop('manual', None)
+    doit_flags = {
+        'deep': False,
+        'meijerg': kwargs.pop('meijerg', None),
+        'conds': kwargs.pop('conds', 'piecewise'),
+        'risch': kwargs.pop('risch', None),
+        'manual': kwargs.pop('manual', None)
+        }
     integral = Integral(*args, **kwargs)
 
     if isinstance(integral, Integral):
-        return integral.doit(deep=False, meijerg=meijerg, conds=conds,
-                             risch=risch, manual=manual)
+        return integral.doit(**doit_flags)
     else:
-        return integral
+        new_args = [a.doit(**doit_flags) if isinstance(a, Integral) else a
+            for a in integral.args]
+        return integral.func(*new_args)
 
 
 def line_integrate(field, curve, vars):


Test patch:
diff --git a/sympy/integrals/tests/test_integrals.py b/sympy/integrals/tests/test_integrals.py
index b186c30dc6..fd6f41bc32 100644
--- a/sympy/integrals/tests/test_integrals.py
+++ b/sympy/integrals/tests/test_integrals.py
@@ -1386,6 +1386,7 @@ def test_issue_14782():
     assert integrate(f, [x, -1, 1]) == - pi / 8
     assert integrate(f, [x, 0, 1]) == S(1) / 3 - pi / 16
 
+
 def test_issue_12081():
     f = x**(-S(3)/2)*exp(-x)
     assert integrate(f, [x, 0, oo]) == oo
@@ -1410,6 +1411,12 @@ def test_issue_15124():
         -I*exp(I*x*omega[m])*exp(I*x*omega[p])/(omega[m] + omega[p])
 
 
+def test_issue_15218():
+    assert Eq(x, y).integrate(x) == Eq(x**2/2, x*y)
+    assert Integral(Eq(x, y), x) == Eq(Integral(x, x), Integral(y, x))
+    assert Integral(Eq(x, y), x).doit() == Eq(x**2/2, x*y)
+
+
 def test_issue_15292():
     res = integrate(exp(-x**2*cos(2*t)) * cos(x**2*sin(2*t)), (x, 0, oo))
     assert isinstance(res, Piecewise)