# Tag Info

64

The integrand has two singular points: Solve[ 4z^2 + 4z + 3 == 0, z] {{z -> 1/2 (-1 - I Sqrt)}, {z -> 1/2 (-1 + I Sqrt)}} At infinity it becomes zero: Limit[ 1/Sqrt[ 4 z^2 + 4 z + 2], z -> ComplexInfinity] 0 All these points are the branch points, thus we should define appropriately integration contours in order to avoid possible jumps ...

42

Taking a limit depends on the path used to approach that limit. Consider the function in the question: f[x_, y_] := Piecewise[{{x y / (x^2 + y^2), x != 0 && y != 0}}, 0]; base = Plot3D[f[x, y], {x, -1, 1}, {y, -1, 1}, MeshStyle->Opacity[0.2], PlotStyle->Opacity[0.5]] (A plot of its graph, saved here as base, appears in subsequent figures.) ...

42

The standard built-in logarithm function is defined for complex variables as follows: Log[z] = Log[Abs[z]] + I Arg[z] The location of the branch cut is simply caused by the convention that polar angles of z are assumed to be in the range $-\pi$ to $\pi$. This same branch cut is also part of the definition of the built-in Arg function. Here is a different ...

40

Funny you should ask :), it turns out there is an undocumented use of Integrate that one can leverage to integrate over regions. Unfortunately this does not seem to work for NIntegrate. This usage is better leveraged in conjunction with some other undocumented functions (see here and here). I will show a few examples of how to use this feature. First, let's ...

36

I can provide an approach by finite elements and an application of the functional calculus of selfadjoint operators. Background The spectrum of the Laplacian on a bounded domain $\varOmega$ with sufficiently smooth boundary subject to homogeneous Dirichlet boundary conditions is discrete. By the spectral theorem, there are eigenfunctions $e_i \in H^1_0(\... 31 We define the function f and multiple constraint functions g1, g2: f[x_, y_, z_] := x y + y z g1[x_, y_] := x^2 + y^2 - 2 g2[x_, z_] := x^2 + z^2 - 2 then, in order to find necessary conditions for constrained extrema we introduce the Lagrange function h with Lagrange multipliers λ1 and λ2: h[x_, y_, z_, λ1_, λ2_] := f[x, y, z] - λ1 g1[x, y] - λ2 g2[x, z] ... 30 Just wanted to update everyone that things are much simpler, - there is built in support for this: MeshFunctions -> {"ArcLength"} So for our case: Show[{ ParametricPlot3D[KnotData[{3, 1}, "SpaceCurve"][t], {t, 0, 2 Pi}, (* the trick *) Mesh -> 15, MeshFunctions -> {"ArcLength"}, (* styles *) MeshStyle -> Directive[Red, ... 28 This is indeed a serious and problematic issue. We know many similar problems with symbolic integration which provides Integrate. There were some improvments in newer versions of the system but also some issues become worse, see e.g. Mathematica 9 can't integrate this function but earlier versions could. ). One can find more problems looking for tags ... 28 Fixed (see below) Here's an approach: r1 = Exp[-x^3 - y] - 1 == z; r2 = y == z; We create ImplicitRegions: reg1 = ImplicitRegion[r1, {x, y, z}]; reg2 = ImplicitRegion[r2, {x, y, z}]; The intersection of these regions is the line you seek: reg = RegionIntersection[reg1, reg2]; And here is the length (note the inclusion of the range of values in ... 28 Let's rename things slightly to make it more consistent g = Fit[newdata, {1, x, x^2, x^3, x^4}, x]; To find inflection points, you can just put (blue) points where the second derivative is zero. Plot[g, {x, 20, 60}, Epilog -> {Red, PointSize[0.02], Point[newdata], Blue, Point[{x, g} /. Solve[D[g, {x, 2}] == 0]]}, PlotRange -> {{-5, 70}, {-5, ... 27 IntegrateInverseIntegrate[(125 - x^3)^(2/3), {x, 0, 5}] (*(500 π)/(9 Sqrt)*) IntegrateInverseIntegrate this is an undocumented function. Another method borrowed code from user: Michael-E2, is using substitution:125 - x^3 == t^3 ClearAll[trysub]; SetAttributes[trysub, HoldFirst]; trysub[Integrate[int_, x_], sub_Equal, u_] := Module[{sol, newint}, sol ... 25 The plan is first get the "external" contour and then use Green's theorem to find its area. r[t_] := {-9 Sin[2 t] - 5 Sin[3 t], 9 Cos[2 t] - 5 Cos[3 t], 0} (*find the intersections*) tr = Quiet@ToRules@Reduce[{r@t1 == r@t2, 0 < t1 < t2 < 2 Pi}, {t1, t2}]; pt = {t1, t2} /. {tr} // Flatten; pts = SortBy[pt, N@# &]; pps = Partition[pts, 2]; Now ... 24 Some programming principles help us make short work of this. The key principle is to encapsulate what's going on. First, the surface. It depends on some parameters, so let's be explicit about that, rather than letting those parameters run around loose as "global" variables. To illustrate, I begin by generating some (reproducible) random values for these ... 24 The problem with using TraditionalForm@Defer is that it won't work as soon as the Defer is gone. So you always need an additional wrapper, different from the simple TraditionalForm wrapper, to get the desired output. It can sometimes be desirable to have the derivative formatted automatically for all TraditionalForm environments, e.g., in Graphics labels etc.... 24 Using Rubi in Mathematica 11.3.0 While the issue clearly is to be resolved eventually by WRI, a solution to the problem of obtaining symbolic solutions to indefinite integrals may be to use Rubi which is short for Rule-based Mathematics - Symbolic Integration Rules by Albert D. Rich. It is written in the Wolfram Language and can be easily used via a ... 23 You can take Michael Trott's code and modify it a bit to easily plot these surfaces Import["http://www.mathematicaguidebooks.org/V6/downloads/\ RiemannSurfacePlot3D.m"] rsurf[func_] := Grid[{{RiemannSurfacePlot3D[w == func, Re[w], {z, w}, ImageSize -> 400, Coloring -> Hue[Rescale[ArcTan[1.4 Im[w]], {-Pi/2, Pi/2}]], PlotPoints -&... 23 For this function: f[z_] := (1 - E^z + z)/(z^3 (z - 1)^2) there are no branch cuts in the complex plane therefore we simply use Cauchy integral theorem and the related formula of the complex residue, i.e. we sum up residues of the function$f$in the circle$\mid z \mid =2$. Let's denote $$int = \oint_{\mid z \mid =2}\frac{1-e^z+z}{z^3 (z-1)^2}dz$$ Now ... 23 To assure that the path of integration stays on the real axis in x and y, use Integrate[(y - y^2 + x - x^2 + 2*x*y)/(1 - x - y), {x, 0, 1}, {y, 0, 1}, PrincipalValue -> True] (* -1 *) Alternative approach Another approach, more complicated but perhaps informative, is to solve the integral using coordinates, {u == x + y, v == x - y}. Flatten@... 23 Original answer Recently, in this forum divergent integrals have become kind of abundant. Therefore, it might be worth to dwell a little more on the subject. Abstract The integral of the OP is obviously divergent. Hence, in order to give it sense at all, the divergence must be circumvented by some additional prescription, normally called "regularization". ... 22 It is Kampé de Fériet function, introduced in Joseph Kampé de Fériet, "La fonction hypergéométrique.", Mémorial des sciences mathématiques, Paris, Gauthier-Villars. Its definition is given on Notations page: (source: wolfram.com) and, in an alternative form, in Wikipedia: $${}^{p+q}f_{r+s}\left( \begin{matrix} a_1,\cdots,a_p\colon b_1,b_1{}';\cdots;b_q,... 22 SphericalPlot3D is having problems where the radius goes to infinity. You can use RegionFunction to restrict the plotting region to a range where the function is well-behaved: SphericalPlot3D[ Sqrt[1/(Sin[θ]^2 Cos[2 ϕ] - Cos[θ]^2)], {θ, 0, π}, {ϕ, 0, 2 π}, MaxRecursion -> 4, PlotRange -> {-3, 3}, RegionFunction -> Function[{x, y, z, θ, ϕ, r},... 22 I believe there are at least three cases treated separately by Derivative. 1) A function defined by a Symbol. This follows the the rule cited in the documentation. g[x___] := f[x]; Derivative[g][x] // Trace (* { { g' , { g[#1] <-- Here the rule is being applied , f[#1] } , f'[#1] & } , (f'[#1] &)[x] , f'[x] } ... 21 The answer is no, because of fundamental mathematical limitations which originate in set theory regarding countability (see e.g. Cantor's theorem) - functions over a given set are more numerous than the set's (power) cardinality. Neither Mathematica nor any other system can integrate every function in an even much more restricted class; namely, Riemann ... 21 I'd advocate taking differences between successive peaks and likewise troughs. These can be found by keeping track of when the derivative is zero. pts = Reap[s = NDSolve[{y'[x] == y[x] Cos[x + y[x]], y == 1, WhenEvent[y'[x] == 0, Sow[x]]}, {y, y'}, {x, 0, 30}]][[2, 1]] (* Out= {0.448211158984, 4.6399193764, 7.44068279785, 10.953122261, \ ... 21 The usual way is to specify both the expression and the relevant variables. Clear[stard] stard[expr_, x_] := Module[{h, result}, result = Limit[((expr /. x -> (x + h))/expr)^(1/h), h -> 0]; result /; Head[result] =!= Limit] stard[x^2, x] (* Exp[2/x] *) This is what builtin functions do too, e.g. Integrate[expr, x] or FourierTransform[expr, t, ... 20 Your definition of entropy is incorrect. It's E(-\ln(P(x))), with E the expectation operator and P the probability mass function of the random variable x. I believe you may have been mixing up a few things. The formal definition of the expectation is E(x)=\int{x P(x)dx}. I assume that you had this in mind and you further confused your random ... 20 I very much suspect that the limit is not 1/4, but rather$$\exp \left( \max_{y>0} \int_{t=0}^1 \left( -yt + \log(1-e^{-yt}) \right) dt \right) \approx 0.185155.$$If I were writing this up on math.SE, I'd start right in on a proof of this, but on this site I think that it would be more welcome to show some of the Mathematica techniques I used to come ... 20 Maximize[{y, x^2 + y^2 == (2 x^2 + 2 y^2 - x)^2}, {x, y}] {(3 Sqrt)/8, {x -> 3/8, y -> (3 Sqrt)/8}} 20 After a lengthy study (I'm using version 8) I conclude that there is a bug in Mathematica in the Integrate function when applied to a Sqrt integrand. Ok. let's go (some patience is required because of the long text) Let us define the functions corresponding to your integrals. Remark: because of the relation$1 + cos(2x) = 2 cos^2(x)\$ the two forms of ...

20

[This is not a full response, but too much detail for a comment.] The general rule is that any integral that can behave differently on a measure zero set in the space of real values of parameters is a candidate for giving a result that will not be what you want. There are other caveats as well, for example in dealing with multiple integrals. And sometimes ...

Only top voted, non community-wiki answers of a minimum length are eligible