Problem with the integral in the limit of a piecewise function - Mathematica Stack Exchange most recent 30 from mathematica.stackexchange.com 2019-09-23T06:21:29Z https://mathematica.stackexchange.com/feeds/question/172670 https://creativecommons.org/licenses/by-sa/4.0/rdf https://mathematica.stackexchange.com/q/172670 1 Problem with the integral in the limit of a piecewise function needved https://mathematica.stackexchange.com/users/51356 2018-05-06T00:37:36Z 2018-05-06T00:37:36Z <p>I have this piecewise function</p> <p>\begin{equation} \psi(x)=\begin{cases} \frac{1}{2} \left[ \left(ln\frac{x}{2}\right)^{2}-\left(Arctanh\sqrt{1-x^{2}} \right)^{2} \right] ,&amp; x\le 1. \\ %1,&amp;\text{if $x&lt;0$}.\\ %0,&amp;\text{otherwise}. \\ \frac{1}{2} \left[ \left(ln\frac{x}{2}\right)^{2}+\left(Arctan\sqrt{x^{2}-1} \right)^{2} \right] ,&amp; x&gt; 1. \\ \end{cases} \end{equation}</p> <p>the correpsonding graph is</p> <p><a href="https://i.stack.imgur.com/HkfeU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HkfeU.png" alt="enter image description here"></a></p> <p>I need to solve this integral </p> <p>\begin{equation} \label {eq: seg2017_2 14} F(\omega)=-i \omega e^{\frac{1}{2}i \omega y^{2}}\int_{0}^{\infty} x J_{0}\left( \omega x y \right) e^{i\omega\left( \frac{1}{2}x^{2}-\psi (x) +\phi_{m}(y) \right)}dx \end{equation}</p> <p>Usually Mathematica help me with this kinds of integrals with the commands "NumericQ" and "NIntegrate". </p> <pre><code>F[y_?NumericQ, w_?NumericQ, g_?NumericQ] := -I*w* Exp[0.5*I*w*y^2]* NIntegrate[ x*(BesselJ[0, w*x*y])* Exp[I*w*(0.5*x^2 - \[Psi][x] + 0.0764808)], {x, 1.1, g}, WorkingPrecision -&gt; 16, MaxRecursion -&gt; 30, Method -&gt; {GlobalAdaptive, MaxErrorIncreases -&gt; 10000}] </code></pre> <p>with values parameters $y=0.3$ and $g = 200000$ and $x$ runing from $(0.1,200000)$ instead $(0,\infty)$</p> <p>The result of this integral is the function $F(\omega)$ that can I plot with</p> <pre><code> FUN = LogLogPlot[{Tooltip@Abs@Subscript[F, 1][0.3, w, 200000]}, {w, 0.001, 100}, PlotRange -&gt; {{0.001, 110}, {0.25, 10}}, PlotStyle -&gt; Black, GridLines -&gt; Automatic, ImageSize -&gt; Large, FrameTicks -&gt; All, PlotPoints -&gt; 40, Frame -&gt; True, AspectRatio -&gt; 1] </code></pre> <p><a href="https://i.stack.imgur.com/XLr8T.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XLr8T.png" alt="enter image description here"></a></p> <p>Can solve the integral in the interval $(0.1,0.99)$ or $(1.1,200000)$ </p> <p>This last graph can be made defining the interval of the integral $(1.1,200000)$ to avoid $x=1$, but I need solve the integral in the interval $(0.1,200000)$</p> <p>The problem is when I start solving this integral in Mathematica, the process crash because the limit of $\psi(x)$ in $x=1$ . I try avoid this using the command "Exclusions->{1}" so Mathematica exclude the values $x=1$ in the integral but not work at all.</p> <p>I hope to have been clear in defining the problem</p> <p>Thanks in advance for any Helpfull hint.</p>