# Tag Info

7

Let k^2 = x^2 + y^2 + z^2 + 1. Then substitute and note that the integral of F[x,y,z] over all {dx, dy, dz} space is the integral over G[k] 4 Pi k^2 dk from 0 to Infinity, bring out the constant factors, change the integration limits, and then your integral is: 4 Pi Exp[-2] Integrate[Exp[2/k^2]/k^8 k Sqrt[k^2-1], {k, 1, Infinity}] which yields (\[Pi]^2 ...

6

To elaborate on the Comment by @Jens, Integrate probably is mishandling this integrand, because ArcSin has branch cuts. The correct solution can be obtained by observing int1 = Integrate[Exp[-x]*DiracDelta[y - Sin[x]], {x, 0, Pi/2}, Assumptions -> {0 < y < 1}] (* 1/(E^ArcSin[y]*Sqrt[1 - y^2]) *) int2 = Integrate[Exp[-x]*DiracDelta[y - Sin[x]], ...

6

Slow down the approach, Limit[Log[2 - Sin[x]*Cos[x]] /. x -> x/2, x -> Infinity] or speed it up, Limit[Log[2 - Sin[x]*Cos[x]] /. x -> 2 x, x -> Infinity] -- both yield Interval[{Log[3/2], Log[5/2]}]

5

CORRECTED for scaling. f1[x_] = x^2; f2[x_] = Sin[x]; Show[ Plot[f1[x], {x, -1, 1}, ColorFunction -> Function[{x, y}, ColorData["DarkRainbow"][f1'[x]]]], Plot[f2[x], {x, -1, 1}, ColorFunction -> Function[{x, y}, ColorData["DarkRainbow"][f2'[x]]]], PlotRange -> All] However, since the the documentation states that the x values fed to ...

5

A limited kind of work-around: expr = Log[2 - Sin[x]*Cos[x]]; TrigReduce //@ expr /. x -> Interval[∞] Interval[{Log[3/2], Log[5/2]}]

4

f[x_] = Log[2 - Sin[x]*Cos[x]]; Simplify[f[x] == f[x + n Pi], Element[n, Integers]] True Since the function is periodic, the limit interval is just the minimum and maximum of the function. Interval@(f[x] /. Solve[{f'[x] == 0, 0 <= x <= 2 Pi}, x, Reals] // FullSimplify // Union) Interval[{Log[3/2], Log[5/2]}] Alternatively, with ...

4

Mathematica is good in integration, but I think Rubi's Mathematica integration package produces more optimal results in general. See this for more examples. In this case, Rubi produced the same result as your second integral (Rubi only does indefinite integration, but one can use limits to compute the definite integration (assuming it is valid to do so, ...

3

Since you have a reputation over 1000, I presume you're familiar with basic plotting and seek stylistic suggestions. I prefer to plot the real and imaginary parts separately: Plot[{Re[x^(1/3)], Im[x^(1/3)]}, {x, -3, 3}, PlotLegends -> {"real", "imaginary"}] You could, of course, also include Abs[x^(1/3)].

3

I don't know what version of Mathematica you're using, but... On V9.0.1, I get the same result as you. On V10.0.1, I get a similar result, but the conditions are embedded in an If statement and the z-integral has not been forgotten; however, the If statement shows that integrand depends on conditions that should have been resolved, given that the z domain ...

3

In version 10, you can also do this: eqn = 1/x + 3/4 (((y - 1/Sqrt[3])/x)^2 + 1) Exp[ArcTan[(y - 1/Sqrt[3])/x] - Pi/6] == 0; region = ImplicitRegion[eqn, {{x, -3, 1}, {y, -1/5, 4}}]; ArcLength@DiscretizeRegion[region, AccuracyGoal -> 6] (* 9.83926 *) But you have to set the AccuracyGoal yourself, and I'm not sure it gives any guarantees on the accuracy ...

3

The given integral can be integrated exactly and quickly. Integrate[fermitotal[beta, k, mu, delta] k^2, {k, 0, 20}] // AbsoluteTiming N@Last[%] (* {0.006876, 8000/3} 2666.67 *) But since, presumably, the OP's actual use-case is not, I'll comment on the set up and the relation of OP's choices to speed. Remarks on the OP's option settings Since it's a ...

2

Integrate[Interpolation[powerdata][x], {x, -360, 360}]

2

Post-processing Lines to add VertexColors that depend on the value of the derivative: funcs = {x^2, Sin[x]}; plt = Plot[funcs, {x, -1, 1}, PlotStyle -> Thick, ImageSize -> 400]; plt2 = Block[{j = 1, k}, Normal[plt] /. Line[z_] :> (k = j++; Line[z, VertexColors -> (ColorData["Rainbow"] /@ ((D[funcs[[k]], x] /. x -> #) ...

2

Perform the line integral over the straight-line path from the origin to $(x,y)$ via the parametrization $u(t)=(tx,ty)$ for $0\le t\le1$. Then $\mathrm du=(x,y)\,\mathrm dt$, so the integral can be computed as Integrate[b[t x, t y].{x, y}, {t, 0, 1}] Note that if $b = \nabla a$, from $b$ one can only recover $a$ up to a constant. In this case, since we ...

2

Although this is not the solution of the problem as stated, it might be interesting to see some preliminary results, and these cannot be well read in a comment. It turns out that the problem simply is too big for a straightforward application of Mathematica. First we define some useful quantitites (we apply Mathematica nameing conventions) ...

2

Try this: Flatten@Position[Sqrt[2 Range[512] + 1], _Integer, 1] resulting in {4, 12, 24, 40, 60, 84, 112, 144, 180, 220, 264, 312, 364, 420, 480} You'll notice that the quasi-periodic oscillations are centered at the numbers in the list above. This is due to the fact that $\sqrt{2i+1}\in\mathbb{Z}$ for those values of $i$, and presumably Integrate's ...

2

One can expand the hypergeometric function as a series of the last argument and take the derivative series[Derivative[n__][f_][args__], k_] := Module[{vars = {args} /. Except[_List | List] :> Unique[]}, FullSimplify[# (Last@vars)^k /. Thread[Flatten@vars -> Flatten@{args}], Assumptions -> {k ∈ Integers, k >= 0}] &@ ...

1

You can solve for the reciprocal of res: capacitance =.; Solve[i[250*10^-6, res] == 10^-6 /. res -> 1/reciprocal, reciprocal, Reals] Solve::ratnz: Solve was unable to solve the system with inexact coefficients. The answer was obtained by solving a corresponding exact system and numericizing the result. >> {{reciprocal -> ...

1

This isn't exactly an answer but perhaps it's a step in the right direction. Actually with the subsequent edits I think it is an answer. You'll need to do the calculations yourself and check that I didn't screw anything up but I think this works and gives you a closed form expression. f[x_] = FunctionExpand[HypergeometricPFQRegularized[{1, 1, 1, 1}, {2, 2, ...

1

Here is the "code" of your question with unspecified blanks filled in and errors fixed: F[u_] := Log[u] - Cos[u^2] Exp[-u]; Umax[x_, y_] := x + y; W[x_?NumericQ, y_?NumericQ] := NIntegrate[F[u], {u, 0, Umax[x, y]}]; g[x_?NumericQ, y_?NumericQ] := x^2/y^2; Alpha[x_?NumericQ] := Tanh[x]; myFunction[x_?NumericQ] := NIntegrate[g[x, y]*W[x, y], {y, ...

1

Unprotect[Dot]; SetAttributes[Dot, Orderless] Protect[Dot] then try to evaluate this again D[V[t]/Sqrt[Dot[V[t], V[t]]], t] of course it would be better to define new function based on dot and set it attribute Orderless

1

Expanding comment: M can't find analytical antiderivative. you can try different upper limits, build table of data, and try to do an interpolation function of the result, something like: expr = (a r Exp[-r] - b r Sin[k (r - d)] Exp[-r]) BesselJ[0, k r]; expr = expr /. {k -> 1, a -> 1, d -> 2, b -> 3}; data = Table[{R0, NIntegrate[expr, {r, 0, ...

1

The reason why D[u[t]]>0 doesn't work is that the derivative at the changing point doesn't exist. You can verify this by: D[UnitBox[x], x] $\begin{array}{cc} \{ & \begin{array}{cc} \text{Indeterminate} & x=\frac{1}{2}\lor x=-\frac{1}{2} \\ 0 & \text{True} \\ \end{array} \\ \end{array}$ So the predicate in WhenEvent never come true. ...

1

Use ParametericNDSolve to get a solution that depends parametrically on r: sol = ParametricNDSolve[{R'[ T] == (-R[T]/ T) ((1 + Sqrt[0.13 r^3 + 2 r - (0.5)^2])/(1 - Sqrt[0.13 r^3 + 2 r - (0.5)^2])), R[1] == 1}, R, {T, 1, 10}, {r}] Then you can get a solution for a specific r by R1 = R[5] /. sol which can be plotted Plot[R1[T], ...

1

I'm afraid that this is a bit puzzling indeed. If I use your example and run the NIntegrate without all the fancy options I get {0.006944, 2666.67}. So I assume it has something to do with your options. Leaving out the method, but leaving everything else in place, slows down things dramatically, but it is still doable: {0.561119, 2666.666666667}, ...

1

In the case that one cannot solve the equation for a symbolic parametric representation, then NDSolve can be used to do so numerically. And while we're at it, we may as well integrate the arclength. In the code below, we compute an arc length parametrization, so the parametrization returns to it's starting point when the parameter s equals the total arc ...

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