Repository: sympy/sympy

Issue:
Add integral rewriting for Si/Ci/FresnelS/FresnelC/Ei
See #26134 for details.  Do this for 

- [x] expint: see https://github.com/sympy/sympy/pull/26135
- [ ] Ci
- [ ] Si
- [ ] FresnelS
- [ ] FresnelC
- [ ] Ei

### How to get started

- take a look at  https://github.com/sympy/sympy/pull/26135
- do something similar


Discussion:

Patch:
diff --git a/sympy/functions/special/error_functions.py b/sympy/functions/special/error_functions.py
index 31e8dfac4d..7fb605ddbb 100644
--- a/sympy/functions/special/error_functions.py
+++ b/sympy/functions/special/error_functions.py
@@ -1216,6 +1216,11 @@ def _eval_rewrite_as_Si(self, z, **kwargs):
     def _eval_rewrite_as_tractable(self, z, limitvar=None, **kwargs):
         return exp(z) * _eis(z)
 
+    def _eval_rewrite_as_Integral(self, z, **kwargs):
+        from sympy.integrals.integrals import Integral
+        t = Symbol('t', Dummy=True)
+        return Integral(S.Exp1**t/t, (t, S.NegativeInfinity, z))
+
     def _eval_as_leading_term(self, x, logx=None, cdir=0):
         from sympy import re
         x0 = self.args[0].limit(x, 0)
@@ -1901,6 +1906,8 @@ def _eval_rewrite_as_sinc(self, z, **kwargs):
         t = Symbol('t', Dummy=True)
         return Integral(sinc(t), (t, 0, z))
 
+    _eval_rewrite_as_Integral =  _eval_rewrite_as_sinc
+
     def _eval_aseries(self, n, args0, x, logx):
         from sympy.series.order import Order
         point = args0[0]
@@ -2025,6 +2032,11 @@ def _Ifactor(cls, z, sign):
     def _eval_rewrite_as_expint(self, z, **kwargs):
         return -(E1(polar_lift(I)*z) + E1(polar_lift(-I)*z))/2
 
+    def _eval_rewrite_as_Integral(self, z, **kwargs):
+        from sympy.integrals.integrals import Integral
+        t = Symbol('t', Dummy=True)
+        return S.EulerGamma + log(z) - Integral((1-cos(t))/t, (t, 0, z))
+
     def _eval_as_leading_term(self, x, logx=None, cdir=0):
         arg = self.args[0].as_leading_term(x, logx=logx, cdir=cdir)
         arg0 = arg.subs(x, 0)
@@ -2447,6 +2459,11 @@ def _eval_rewrite_as_meijerg(self, z, **kwargs):
         return (pi*z**Rational(9, 4) / (sqrt(2)*(z**2)**Rational(3, 4)*(-z)**Rational(3, 4))
                 * meijerg([], [1], [Rational(3, 4)], [Rational(1, 4), 0], -pi**2*z**4/16))
 
+    def _eval_rewrite_as_Integral(self, z, **kwargs):
+        from sympy.integrals.integrals import Integral
+        t = Symbol('t', Dummy=True)
+        return Integral(sin(t**2), (t, 0, z))
+
     def _eval_as_leading_term(self, x, logx=None, cdir=0):
         from sympy.series.order import Order
         arg = self.args[0].as_leading_term(x, logx=logx, cdir=cdir)
@@ -2603,6 +2620,11 @@ def _eval_rewrite_as_meijerg(self, z, **kwargs):
         return (pi*z**Rational(3, 4) / (sqrt(2)*root(z**2, 4)*root(-z, 4))
                 * meijerg([], [1], [Rational(1, 4)], [Rational(3, 4), 0], -pi**2*z**4/16))
 
+    def _eval_rewrite_as_Integral(self, z, **kwargs):
+        from sympy.integrals.integrals import Integral
+        t = Symbol('t', Dummy=True)
+        return Integral(cos(t**2), (t, 0, z))
+
     def _eval_as_leading_term(self, x, logx=None, cdir=0):
         from sympy.series.order import Order
         arg = self.args[0].as_leading_term(x, logx=logx, cdir=cdir)


Test patch:
diff --git a/sympy/functions/special/tests/test_error_functions.py b/sympy/functions/special/tests/test_error_functions.py
index 38fb9fcf2a..8c69a3b09a 100644
--- a/sympy/functions/special/tests/test_error_functions.py
+++ b/sympy/functions/special/tests/test_error_functions.py
@@ -817,5 +817,10 @@ def test_fresnel_series():
     assert ((3*fresnelc(2*z)).series(z, oo) - 3*fc.subs(z, 2*z)).expand().is_Order
 
 
-def test_issue_26134():
+def test_integral_rewrites(): #issues 26134, 26144
     assert expint(n, x).rewrite(Integral).dummy_eq(Integral(t**-n * exp(-t*x), (t, 1, oo)))
+    assert Si(x).rewrite(Integral).dummy_eq(Integral(sinc(t), (t, 0, x)))
+    assert Ci(x).rewrite(Integral).dummy_eq(log(x) - Integral((1 - cos(t))/t, (t, 0, x)) + EulerGamma)
+    assert fresnels(x).rewrite(Integral).dummy_eq(Integral(sin(t**2), (t, 0, x)))
+    assert fresnelc(x).rewrite(Integral).dummy_eq(Integral(cos(t**2), (t, 0, x)))
+    assert Ei(x).rewrite(Integral).dummy_eq(Integral(exp(t)/t, (t, -oo, x)))