I want the code to integrate equation(1) or (2)over the limits using mathematical or mathlab to get equation (3) as the answer of Z vibrational partition function , giving the following additional information $$ \begin{aligned} Z_{v i b}(\beta) &=\sum_{n=0}^{\lambda} e^{-\beta E_{n}}, \quad \beta=\frac{1}{k T}, \\ \lambda &=-c+\sqrt{A} \pm \sqrt{A-B} \end{aligned} $$, $$ Z_{v i b}(\beta)=\sum_{n=0}^{\lambda} e^{\frac{\beta a^{2} \hbar^{2}}{4 m}(B-2 A)+\frac{\beta a^{2} \hbar^{2} B^{2}}{8 m(n+c)^{2}}+\frac{\beta a^{2} \hbar^{2}}{8 m}(n+c)^{2}} $$ In the classical limit, the summation turns to integral $$ \begin{array}{l} Z_{v i b}(\beta)=\int_{0}^{\lambda} e^{\frac{\beta a^{2} \hbar^{2}}{4 m}(B-2 A)+\frac{\beta a^{2} \hbar^{2} B^{2}}{8 m(n+c)^{2}}+\frac{\beta a^{2} \hbar^{2}}{8 m}(n+c)^{2}} d n,............(1) \\ =\int_{c}^{\lambda+c} e^{\frac{\beta a^{2} \hbar^{2}}{4 m }(B-2 A)+\frac{\beta a^{2} \hbar^{2} B^{2}}{8 m \rho^{2}}+\frac{\beta a^{2} \hbar^{2}}{8 m \prime} \rho^{2}} d \rho, \rho=c+n ...........(2)\\ =e^{\beta \Lambda_{3}} \sqrt{\pi}\left[\frac{\left[1-\operatorname{Erf}\left(\Lambda_{1} \sqrt{\beta}\right)\right]-e^{\Lambda_{4} \beta}\left[1-\operatorname{Erf}\left(\Lambda_{2} \sqrt{\beta}\right)\right]}{\Lambda_{5} \sqrt{\beta}}\right]...........(3) \end{array} $$
where we have also introduced the following parameters for mathematical simplicity, $$ \begin{array}{l} \Lambda_{1}=\frac{1}{\rho} \sqrt{-\frac{a^{2} \hbar^{2} B^{2}}{8 m}}-\rho \sqrt{-\frac{a^{2} \hbar^{2}}{8 m}}, \quad \Lambda_{2}=\frac{1}{\rho} \sqrt{-\frac{a^{2} \hbar^{2} B^{2}}{8 m}}+\rho \sqrt{-\frac{a^{2} \hbar^{2}}{8 m}} \\ \Lambda_{3}=-\frac{a^{2} \hbar^{2} A}{2 m}, \Lambda_{4}=\frac{a^{2} \hbar^{2} B}{2 m}, \Lambda_{5}=\sqrt{-2 a^{2} \hbar^{2}}, \quad c \leq \rho \leq c+\lambda \end{array} $$ Many thanks.