```python
import sympy as sp
```


```python
x = sp.symbols("x")
sp.integrate(sp.exp(-x**2), (x, -sp.oo, sp.oo))
```




$\displaystyle \sqrt{\pi}$




```python
x, L, n = sp.symbols("x, L, n")
g = sp.Function("g")

sp.integrate(sp.Sum(sp.exp(-sp.I*sp.pi/L*n*x), (n, -sp.oo, sp.oo)).doit(), (x, 0, L))
```




$\displaystyle \int\limits_{0}^{L} \sum_{n=-\infty}^{\infty} e^{- \frac{i \pi n x}{L}}\, dx$




```python
x, k, kappa, L = sp.symbols(r"x, k, \kappa, L", real=True)

sp.integrate(sp.cosh(kappa*x)*sp.sin(k*x)*x, (x, -L/2, L/2))
```




$\displaystyle \begin{cases} 0 & \text{for}\: \left(\kappa = 0 \wedge k = 0\right) \vee \left(\kappa = 0 \wedge \kappa = - i k \wedge k = 0\right) \vee \left(\kappa = 0 \wedge \kappa = i k \wedge k = 0\right) \vee \left(\kappa = 0 \wedge \kappa = - i k \wedge \kappa = i k \wedge k = 0\right) \\\frac{L \sin^{2}{\left(\frac{L k}{2} \right)}}{4 k} - \frac{L \cos^{2}{\left(\frac{L k}{2} \right)}}{4 k} + \frac{\sin{\left(\frac{L k}{2} \right)} \cos{\left(\frac{L k}{2} \right)}}{2 k^{2}} & \text{for}\: \left(\kappa = 0 \wedge \kappa = - i k\right) \vee \left(\kappa = 0 \wedge \kappa = i k\right) \vee \left(\kappa = - i k \wedge \kappa = i k\right) \vee \left(\kappa = - i k \wedge k = 0\right) \vee \left(\kappa = i k \wedge k = 0\right) \vee \left(\kappa = 0 \wedge \kappa = - i k \wedge \kappa = i k\right) \vee \left(\kappa = - i k \wedge \kappa = i k \wedge k = 0\right) \vee \kappa = - i k \vee \kappa = i k \\\frac{L \kappa^{3} \sin{\left(\frac{L k}{2} \right)} \sinh{\left(\frac{L \kappa}{2} \right)}}{\kappa^{4} + 2 \kappa^{2} k^{2} + k^{4}} - \frac{L \kappa^{2} k \cos{\left(\frac{L k}{2} \right)} \cosh{\left(\frac{L \kappa}{2} \right)}}{\kappa^{4} + 2 \kappa^{2} k^{2} + k^{4}} + \frac{L \kappa k^{2} \sin{\left(\frac{L k}{2} \right)} \sinh{\left(\frac{L \kappa}{2} \right)}}{\kappa^{4} + 2 \kappa^{2} k^{2} + k^{4}} - \frac{L k^{3} \cos{\left(\frac{L k}{2} \right)} \cosh{\left(\frac{L \kappa}{2} \right)}}{\kappa^{4} + 2 \kappa^{2} k^{2} + k^{4}} - \frac{2 \kappa^{2} \sin{\left(\frac{L k}{2} \right)} \cosh{\left(\frac{L \kappa}{2} \right)}}{\kappa^{4} + 2 \kappa^{2} k^{2} + k^{4}} + \frac{4 \kappa k \cos{\left(\frac{L k}{2} \right)} \sinh{\left(\frac{L \kappa}{2} \right)}}{\kappa^{4} + 2 \kappa^{2} k^{2} + k^{4}} + \frac{2 k^{2} \sin{\left(\frac{L k}{2} \right)} \cosh{\left(\frac{L \kappa}{2} \right)}}{\kappa^{4} + 2 \kappa^{2} k^{2} + k^{4}} & \text{otherwise} \end{cases}$




```python
sp.integrate(sp.sinh(kappa*x)*sp.cos(k*x)*x, (x, -L/2, L/2))
```




$\displaystyle \begin{cases} 0 & \text{for}\: \left(\kappa = 0 \wedge k = 0\right) \vee \left(\kappa = 0 \wedge \kappa = - i k \wedge k = 0\right) \vee \left(\kappa = 0 \wedge \kappa = i k \wedge k = 0\right) \vee \left(\kappa = 0 \wedge \kappa = - i k \wedge \kappa = i k \wedge k = 0\right) \\i \left(- \frac{L \sin^{2}{\left(\frac{L k}{2} \right)}}{8 k} + \frac{L \cos^{2}{\left(\frac{L k}{2} \right)}}{8 k} - \frac{\sin{\left(\frac{L k}{2} \right)} \cos{\left(\frac{L k}{2} \right)}}{4 k^{2}}\right) - i \left(\frac{L \sin^{2}{\left(\frac{L k}{2} \right)}}{8 k} - \frac{L \cos^{2}{\left(\frac{L k}{2} \right)}}{8 k} + \frac{\sin{\left(\frac{L k}{2} \right)} \cos{\left(\frac{L k}{2} \right)}}{4 k^{2}}\right) & \text{for}\: \left(\kappa = 0 \wedge \kappa = - i k\right) \vee \left(\kappa = - i k \wedge \kappa = i k\right) \vee \left(\kappa = - i k \wedge k = 0\right) \vee \left(\kappa = 0 \wedge \kappa = - i k \wedge \kappa = i k\right) \vee \left(\kappa = - i k \wedge \kappa = i k \wedge k = 0\right) \vee \kappa = - i k \\- i \left(- \frac{L \sin^{2}{\left(\frac{L k}{2} \right)}}{8 k} + \frac{L \cos^{2}{\left(\frac{L k}{2} \right)}}{8 k} - \frac{\sin{\left(\frac{L k}{2} \right)} \cos{\left(\frac{L k}{2} \right)}}{4 k^{2}}\right) + i \left(\frac{L \sin^{2}{\left(\frac{L k}{2} \right)}}{8 k} - \frac{L \cos^{2}{\left(\frac{L k}{2} \right)}}{8 k} + \frac{\sin{\left(\frac{L k}{2} \right)} \cos{\left(\frac{L k}{2} \right)}}{4 k^{2}}\right) & \text{for}\: \left(\kappa = 0 \wedge \kappa = i k\right) \vee \left(\kappa = i k \wedge k = 0\right) \vee \kappa = i k \\\frac{L \kappa^{3} \cos{\left(\frac{L k}{2} \right)} \cosh{\left(\frac{L \kappa}{2} \right)}}{\kappa^{4} + 2 \kappa^{2} k^{2} + k^{4}} + \frac{L \kappa^{2} k \sin{\left(\frac{L k}{2} \right)} \sinh{\left(\frac{L \kappa}{2} \right)}}{\kappa^{4} + 2 \kappa^{2} k^{2} + k^{4}} + \frac{L \kappa k^{2} \cos{\left(\frac{L k}{2} \right)} \cosh{\left(\frac{L \kappa}{2} \right)}}{\kappa^{4} + 2 \kappa^{2} k^{2} + k^{4}} + \frac{L k^{3} \sin{\left(\frac{L k}{2} \right)} \sinh{\left(\frac{L \kappa}{2} \right)}}{\kappa^{4} + 2 \kappa^{2} k^{2} + k^{4}} - \frac{2 \kappa^{2} \cos{\left(\frac{L k}{2} \right)} \sinh{\left(\frac{L \kappa}{2} \right)}}{\kappa^{4} + 2 \kappa^{2} k^{2} + k^{4}} - \frac{4 \kappa k \sin{\left(\frac{L k}{2} \right)} \cosh{\left(\frac{L \kappa}{2} \right)}}{\kappa^{4} + 2 \kappa^{2} k^{2} + k^{4}} + \frac{2 k^{2} \cos{\left(\frac{L k}{2} \right)} \sinh{\left(\frac{L \kappa}{2} \right)}}{\kappa^{4} + 2 \kappa^{2} k^{2} + k^{4}} & \text{otherwise} \end{cases}$




```python
sp.integrate(sp.cosh(kappa*x)*sp.cos(k*x), (x, -L/2, L/2))
```




$\displaystyle \begin{cases} L & \text{for}\: \left(\kappa = 0 \wedge k = 0\right) \vee \left(\kappa = 0 \wedge \kappa = - i k \wedge k = 0\right) \vee \left(\kappa = 0 \wedge \kappa = i k \wedge k = 0\right) \vee \left(\kappa = 0 \wedge \kappa = - i k \wedge \kappa = i k \wedge k = 0\right) \\\frac{L \sin^{2}{\left(\frac{L k}{2} \right)}}{2} + \frac{L \cos^{2}{\left(\frac{L k}{2} \right)}}{2} + \frac{\sin{\left(\frac{L k}{2} \right)} \cos{\left(\frac{L k}{2} \right)}}{k} & \text{for}\: \left(\kappa = 0 \wedge \kappa = - i k\right) \vee \left(\kappa = 0 \wedge \kappa = i k\right) \vee \left(\kappa = - i k \wedge \kappa = i k\right) \vee \left(\kappa = - i k \wedge k = 0\right) \vee \left(\kappa = i k \wedge k = 0\right) \vee \left(\kappa = 0 \wedge \kappa = - i k \wedge \kappa = i k\right) \vee \left(\kappa = - i k \wedge \kappa = i k \wedge k = 0\right) \vee \kappa = - i k \vee \kappa = i k \\\frac{2 \kappa \cos{\left(\frac{L k}{2} \right)} \sinh{\left(\frac{L \kappa}{2} \right)}}{\kappa^{2} + k^{2}} + \frac{2 k \sin{\left(\frac{L k}{2} \right)} \cosh{\left(\frac{L \kappa}{2} \right)}}{\kappa^{2} + k^{2}} & \text{otherwise} \end{cases}$




```python
sp.integrate(sp.sinh(kappa*x)*sp.sin(k*x), (x, -L/2, L/2))
```




$\displaystyle \begin{cases} 0 & \text{for}\: \left(\kappa = 0 \wedge k = 0\right) \vee \left(\kappa = 0 \wedge \kappa = - i k \wedge k = 0\right) \vee \left(\kappa = 0 \wedge \kappa = i k \wedge k = 0\right) \vee \left(\kappa = 0 \wedge \kappa = - i k \wedge \kappa = i k \wedge k = 0\right) \\i \left(- \frac{L \sin^{2}{\left(\frac{L k}{2} \right)}}{4} - \frac{L \cos^{2}{\left(\frac{L k}{2} \right)}}{4} + \frac{\sin{\left(\frac{L k}{2} \right)} \cos{\left(\frac{L k}{2} \right)}}{2 k}\right) - i \left(\frac{L \sin^{2}{\left(\frac{L k}{2} \right)}}{4} + \frac{L \cos^{2}{\left(\frac{L k}{2} \right)}}{4} - \frac{\sin{\left(\frac{L k}{2} \right)} \cos{\left(\frac{L k}{2} \right)}}{2 k}\right) & \text{for}\: \left(\kappa = 0 \wedge \kappa = - i k\right) \vee \left(\kappa = - i k \wedge \kappa = i k\right) \vee \left(\kappa = - i k \wedge k = 0\right) \vee \left(\kappa = 0 \wedge \kappa = - i k \wedge \kappa = i k\right) \vee \left(\kappa = - i k \wedge \kappa = i k \wedge k = 0\right) \vee \kappa = - i k \\- i \left(- \frac{L \sin^{2}{\left(\frac{L k}{2} \right)}}{4} - \frac{L \cos^{2}{\left(\frac{L k}{2} \right)}}{4} + \frac{\sin{\left(\frac{L k}{2} \right)} \cos{\left(\frac{L k}{2} \right)}}{2 k}\right) + i \left(\frac{L \sin^{2}{\left(\frac{L k}{2} \right)}}{4} + \frac{L \cos^{2}{\left(\frac{L k}{2} \right)}}{4} - \frac{\sin{\left(\frac{L k}{2} \right)} \cos{\left(\frac{L k}{2} \right)}}{2 k}\right) & \text{for}\: \left(\kappa = 0 \wedge \kappa = i k\right) \vee \left(\kappa = i k \wedge k = 0\right) \vee \kappa = i k \\\frac{2 \kappa \sin{\left(\frac{L k}{2} \right)} \cosh{\left(\frac{L \kappa}{2} \right)}}{\kappa^{2} + k^{2}} - \frac{2 k \cos{\left(\frac{L k}{2} \right)} \sinh{\left(\frac{L \kappa}{2} \right)}}{\kappa^{2} + k^{2}} & \text{otherwise} \end{cases}$




```python
a, b = sp.symbols("a, b")
sp.simplify(a*sp.sin(a)*sp.sinh(b) + b*sp.cos(a)*sp.cosh(b))
```




$\displaystyle a \sin{\left(a \right)} \sinh{\left(b \right)} + b \cos{\left(a \right)} \cosh{\left(b \right)}$



277d95cd24800b06f54b982079a04e9736857aff
ipynb
Jupyter Notebook
temp_cas_notebook.ipynb
Basistransformoptimusprime/Particle_in_a_Box
61c8587cc449cb0d0d0b6aaa499a524a9133fbca
MIT
2021-05-30T19:39:44.000Z
2021-05-30T19:39:44.000Z
temp_cas_notebook.ipynb
Basistransformoptimusprime/Particle_in_a_Box
61c8587cc449cb0d0d0b6aaa499a524a9133fbca
MIT
temp_cas_notebook.ipynb
Basistransformoptimusprime/Particle_in_a_Box
61c8587cc449cb0d0d0b6aaa499a524a9133fbca
MIT
Qwen/Qwen-72B
1. YES
2. YES