```
%pylab inline
```

    
    Welcome to pylab, a matplotlib-based Python environment [backend: module://IPython.zmq.pylab.backend_inline].
    For more information, type 'help(pylab)'.



```
from sympy import Symbol, fresnels, fresnelc, oo, I, re, im, series, Rational, sin, cos, exp, plot
from sympy.plotting import plot, plot_parametric
from matplotlib.pyplot import figsize
```

Plot of the two Fresnel integrals $S(x)$ and $C(x)$


```
x = Symbol("x")
```


```
plot(fresnels(x), fresnelc(x), (x, 0, 8))
```

The Cornu spiral defined as the parametric curve $u(t),v(t) := C(t), S(t)$


```
figsize(8,8)
plot_parametric(fresnelc(x), fresnels(x))
```

Compute and plot the leading order behaviour around $x=0$


```
ltc = series(fresnelc(x), x, n=2).removeO()
lts = series(fresnels(x), x, n=4).removeO()
```


```
lts, ltc
```




    (pi*x**3/6, x)




```
figsize(4,4)
plot(fresnels(x), lts, (x, 0, 1))
plot(fresnelc(x), ltc, (x, 0, 1))
```

Compute and plot the asymptotic series expansion at $x=\infty$


```
# Series expansion at infinity is not implemented yet
#ats = series(fresnels(x), x, oo)
#atc = series(fresnelc(x), x, oo)
```


```
# However we can use the well known values
ats = Rational(1,2) - cos(pi*x**2/2)/(pi*x)
atc = Rational(1,2) + sin(pi*x**2/2)/(pi*x)
```


```
figsize(4,4)
plot(fresnels(x), ats, (x, 6, 8))
plot(fresnelc(x), atc, (x, 6, 8))
```
Another nice example of a parametric plot

```
alpha = Symbol("alpha")
r = 3.0
circ = r*exp(1.0j*alpha)
```


```
figsize(8,8)
plot_parametric(re(fresnelc(circ)), im(fresnelc(circ)), (alpha, 0, 2*pi))
```


```

```

91907e16c60ff0a4ca6468af6f1c6d8c7e1256e2
ipynb
Jupyter Notebook
examples/notebooks/fresnel_integrals.ipynb
Michal-Gagala/sympy
3cc756c2af73b5506102abaeefd1b654e286e2c8
MIT
examples/notebooks/fresnel_integrals.ipynb
Michal-Gagala/sympy
3cc756c2af73b5506102abaeefd1b654e286e2c8
MIT
examples/notebooks/fresnel_integrals.ipynb
Michal-Gagala/sympy
3cc756c2af73b5506102abaeefd1b654e286e2c8
MIT
Qwen/Qwen-72B
1. YES
2. YES