New answers tagged

1

It is definitely a bug. Daniel Lichtblau pointed out that it is well know since 14 years. Although I have been on board for almost this time I wasn't aware of it. So let me just make some humble remarks. It is even worse. $Version (* Out[156]= "10.1.0 for Microsoft Windows (64-bit) (March 24, 2015)" *) Define f[n_, a_] := (1 + (-1)^n/n^a)^n If a>0 ...


4

Some insight can be gained by plotting Sqrt[Exp[I*t]^2 - 1] in the complex plane. Plot3D[Evaluate[ReIm[Sqrt[Exp[I*t]^2 - 1] /. t -> tr + I ti]], {tr, 0, Pi}, {ti, -1, 1}, AxesLabel -> {tr, ti, f}] Branch points occur at t == n Pi, n an integer, with branch cuts extending from the branch points to t == n Pi + I ∞. Visibly, there also are ...


0

(community wiki) This is a slightly cleaned up version to demonstrate the error. A = 1; \[Alpha] = 4; \[Mu] = 1.0000; k = 0; \[Tau] = 1; \[Delta] = 1/2; m = 1/2; s[rd_] := (\[Mu] rd^\[Alpha])/Pm; LocalMeanPowerInLinear = 1; LocalMeanPowerIndB = Log10[LocalMeanPowerInLinear]*10; \[Beta] = LocalMeanPowerIndB*Log[10]/10; StdSindB = 8; \[Sigma] = ...


1

By using SetDelayed (short form :=) to define the function g1 or g2 you prevent the evaluation of b1 or b2 respectively into the assigned expression, so e.g. g1 has for its complete definition: ?? g1 Global`g1 g1[s_]:=Piecewise[b1,0] Parameter substitutions into the right-hand-side are made before further evaluation, and since there is no literal s ...


1

Simplify[(1/T)* Integrate[2*t/T*Exp[-I*2*Pi/T*k*t], {t, 0, T/2}, Assumptions -> T > 0] + (1/T)* Integrate[2*(T - t)/T*Exp[-I*2*Pi/T*k*t], {t, T/2, T}, Assumptions -> 0 < T/2 < T], k \[Element] Integers] (* (-1 + (-1)^k)/(k^2 Pi^2) *) check your solution Simplify[(Exp[Pi (-I) k] - 1)/(Pi^2 k^2), k \[Element] Integers] (* ...


0

Yours syntax is very bad. Search and Read this first. sol = (1/T)*Integrate[(2*t/T)*Exp[-I*2*Pi/T*k*t], {t, 0, T/2}] + (1/T)*Integrate[(2*(T - t)/T)*Exp[-I*2*Pi/T*k*t], {t, T/2, T}] FullSimplify[sol] and answer: $-\frac{e^{-i \pi k} (\cos (\pi k)-1)}{\pi ^2 k^2}$


1

Use higher precision f[x_] = -(10^-20 x)/(0.99005 - E^(10^-12 x)) // Rationalize // Simplify; int = Integrate[f[x], {x, 0, 10^9}] // FullSimplify; int // N[#, 20] & // Chop[#, 10^-20] & (* 0.47118211649097404645 *)


1

First, if you use Integrate, you should define your function exactly. Don't use approximate numbers like 0.99005. f[x_] = -(x/(10^20*(99005/100000 - Exp[x/10^12]))) Integrate[f[x], {x, 0, 10^9}] (* Complicated exact expression involving Log and PolyLog *) Evaluating this approximately indeed yields a small imaginary part. %//N (* 0.471182 - ...


3

Here is a simple answer Define k[n] as a listable function : SetAttributes[k, Listable] k[n_] := \!\( \*SubsuperscriptBox[\(\[Integral]\), \(3\), \(10\)]\( \*FractionBox[\(1 + Cos[f\ \((1 + 2\ n\ )\)\ \[Pi]]\), \(1 + Cos[f\ \[Pi]]\)] \[DifferentialD]f\)\) then define a list compose of integer of the desired Length --- say 10 nn = Range[10] ask ...


11

There appears to be a bug, not in Integrate or in BesselK, but in the vertical-axis Ticks of LogLogPlot. Consider the simple case, LogLogPlot[Exp[x], {x, 10^-10, 1}, PlotRange -> All] as it should be. However, LogLogPlot[Exp[x], {x, 10^-10, 1}, WorkingPrecision -> 50, PlotRange -> All] In fact, any value of WorkingPrecision except ...


3

I have found my mistake. It was on the initial condition if we take $$\phi(zi)=0$$ and $$\phi'(zi)=0$$ the both methods will give the exact same solution.


4

As it turns out, although Mathematica is unable to deal with the integral as it stands, using the Kelvin functions yields an answer equivalent to the one returned by Maple. In particular, Integrate[(y/x) (KelvinBer[1, x]^2 + KelvinBei[1, x]^2), {y, 0, r}, {x, 0, y}] 1/32 r^4 HypergeometricPFQ[{1/2}, {3/2, 3/2, 2, 2}, r^4/64] where I used one of the ...


8

The culprit, as suspected by xslittlegrass, is indeed numerical instability; in particular, this is because of the perverse combination of modified Bessel functions exhibited in the result returned by Mathematica. Using a recurrence identity satisfied by the modified Bessel function of the first kind, we can simplify the expression returned, like so: ...


9

It seems that the analytic result is correct, but the precision is lost when converting it to a number. For example, if we use a higher precision, we get consistent results between numerical and analytical integration: f[a_, b_] = Integrate[x^2 Exp[-a x^2 - b x^4], {x, -∞, ∞}, Assumptions -> {a > 0, b > 0}] g[a_, b_] := NIntegrate[x^2 Exp[-a ...


1

THIS IS AN EXTENDED COMMENT RATHER THAN AN ANSWER. $Version (* "10.4.1 for Mac OS X x86 (64-bit) (April 11, 2016)" *) fRe[x_, σ_] = 1/(Sqrt[2 π] σ) Exp[-(x^2/(2 σ^2))]; Integrate[fRe[x, σ]/(x - X), {x, -∞, ∞}, PrincipalValue -> True, Assumptions -> σ > 0] (* ConditionalExpression[ -((Sqrt[2]*DawsonF[X/(Sqrt[2]*σ)])/σ), Re[X] > 0 ...


0

Let us use 18 methods of numerical integration and see that the results of which overlaps. Warning!!!.The calculations take a long time. (several hours). ClearAll["Global`*"] f = ((1/4) (n1 - 1) n1 (2 n2 - 1)) (e1 - n1)^2 (-(1/4) (e1 - 1) e1 (2 e2 - 1))/(8 (4 + (e1 - n1)^2 + (e2 - n2)^2)^(3/2)); method = {"GlobalAdaptive", "LocalAdaptive", ...


0

If "is there any wise way?" doesn't exclude a Monte Carlo method, then the following might be considered: f = ((1/4) (n1 - 1) n1 (2 n2 - 1)) (e1 - n1)^2 (-(1/4) (e1 - 1) e1 (2 e2 - 1))/ (8 (4 + (e1 - n1)^2 + (e2 - n2)^2)^(3/2)); NIntegrate[f, {e1, -1, 1}, {e2, -1, 1}, {n1, -1, 1}, {n2, -1, 1}, Method -> "AdaptiveQuasiMonteCarlo"] (* ...


0

For the cited problem: Integrate[ If[Abs[x] + Abs[y] + Abs[z] < 4, 1, 0], {x, -4, 4}, {y, -4, 4}, {z, -4, 4}] (* 256/3 *) RegionPlot3D[Abs[x] + Abs[y] + Abs[z] < 4, {x, -4, 4}, {y, -4, 4}, {z, -4, 4}, PlotPoints -> 50] For this problem: Integrate[ If[(y - 1/2) - (x + t) > 0 && x - y > 0, ...


1

First note that with the way you defined f2, the error generated at the time of definition notwithstanding, f2 still works properly. The scope & context of your problem is not yet clear to me, but if it was me, I would make the code more general by making it more mathematical. Mathematica can usually handle efficiently most problems that can be ...


5

You need to be consistent with the order of the variables defining the region: region = ImplicitRegion[{(y - 1/2) - (x + t) > 0, x - y > 0}, {{x, -1, 1}, {t, -1, 1}, {y, -1, 1}}] Integrate[(y - 1/2) - (x + t), Element[{x, t, y}, region]] (* 5/128 *) Check: Integrate[1, Element[{x, t, y}, region]] (* 11/48 *) ...


3

For k/z = 1, and integrating by parts: ClearAll["Global`*"] Iv[t_] := Exp[-a*t]*t^2; u[t_] := ArcTanh[Sqrt[(t^2 - 1)/t^2]]; v = Integrate[Iv[t], t]; Du = Simplify@D[u[t], t]; Int == u[t]*v - Integrate[Du*v, t] HoldForm[Integrate[Exp[-a*t]*t^2*ArcTanh[Sqrt[(t^2 - 1)/t^2]], {t, 1, Infinity}] == Limit[-((E^(-a t) (2 + 2 a t + a^2 t^2) ArcTanh[Sqrt[(-1 + ...


10

You need to delay the evaluation of the right-hand side of ScalarCurvature: ScalarCurvature[fun_, xx_, yy_] := scalar /. Derivative[i_, j_][f][x, y] :> D[fun, {xx, i}, {yy, j}] Then it works, although there is a sign difference to your formula: ScalarCurvature[x^2 - y^2, x, y] -(8/(1 + 4 x^2 + 4 y^2)^2)


0

It seems unlikely that a symbolic solution can be obtained with Integrate, even for U == 0. So, I suggest solving the integral numerically. For U == 0, the result is, f[t_] := NIntegrate[(-4 (Sin[y] - 2 Cos[Sqrt[3] x/2] Sin[y/2]))/ Sqrt[(-4 (Sin[y] - 2 Cos[Sqrt[3] x/2] Sin[y/2]))^2 + 4*t^2 (3 + 2 Cos[y] + 4 Cos[y/2] Cos[Sqrt[3] x/2])], {x, -2 ...


4

Preliminary post For k/z = 1 there is a closed form result: I[1,1,a]=((4 + a^2) BesselK[0, a] + a (4 BesselK[1, a] + a BesselK[2, a]))/(2 a^3) The derivation and the extension to k/z != 1 requires some manual interaction to help Mathematica which we will show in the following. Solution Summary As the integral to be calculated is returned unevaluated ...


2

You will probably only be able to do this numerically. The function being integrated is expr = Exp[x]/x*(ExpIntegralE[1, x])^2; LogPlot[expr, {x, 10^-5, 1}, AxesLabel -> {"x", "expr"}] Using numeric integration data = Table[{a, NIntegrate[expr, {x, a, Infinity}]}, {a, 10.^Range[-5, 0, .2]}]; ListLogPlot[data, Joined -> True, PlotRange ...


0

You can just write D[f[x],{x,n}] To get the n-th derivative for x. EDIT: Ah sorry now i get what you asked for. You want that Mathematica gives you the sum in your screenshoot.


9

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 ...


1

Try this: f[y_] := D[y^3*D[y - D[y, x, x], x], x]; g = f[y0[x] + eps*z[x]] // Expand; Coefficient[g, eps] It returns the following: Here z stays instead of your y'. Have fun!


2

I think what you mean is Assuming[a<0 && b\[Element]Reals && c==3, FullSimplify[Integrate[f[a,b,c,d], {d,e,f}]]] if you have different assumptions for different variables, or with the same assumption for a bunch of variables: Assuming[{a, b, c}>0 && a>b, FullSimplify[Integrate[f[a,b,c,d], {d,e,f}]]] so use the ...


4

Here's a way with ParametricRegion: With[{r = Sin[2θ]}, Area[ParametricRegion[{t r Cos[θ], t r Sin[θ]}, {{t, 0, 1}, {θ, 0, π}}]] ] π/4 Edit Looks like Area has a built in syntax for parameterized surfaces: With[{r = Sin[2θ]}, Area[{t r Cos[θ], t r Sin[θ]}, {t, 0, 1}, {θ, 0, π}] ] π/4 Edit 2 Or we can explicitly tell Area to use polar ...


4

Following up on @J.M.'s observations in the comments, differentiate $$m(t)=m(0)-\frac{T(t)-T_0}{Q_S}$$ to get $$\frac{dm}{dt}=-\frac{T'(t)}{Q_S}$$ Combine with $$\frac{dm}{dt}=4 \, T(t)^{3}+T(t)^{2}$$ to get a differential equation in T[t]: $$ T'(t)=-\text{Qs} \left(4 \, T(t)^3+T(t)^2\right)$$ Use DSolve with initial value T[0] == t0: DSolve[{T'[t] ...


5

Using Green's theorem (using in this case: 1/2{-y,x}): c[t_] := {Sin[2 t] Cos[t], Sin[2 t] Sin[t]} Integrate[1/2 ({-1, 1} c[t][[{2, 1}]]).c'[t], {t, 0 , Pi}] yields $\pi/4$. Arc length: arclength = Integrate[Sqrt[c'[t].c'[t]], {t, 0, Pi}] yields:4 EllipticE[3/4] (4.84422)


7

Area As described on this page, the area enclosed by a polar curve is given by $$A = \int_\alpha^\beta \frac{r(\theta)^2}{2} \mathrm{d}\theta$$ In your case this is, Integrate[Sin[2 θ]^2/2, {θ, 0, π}] N@% (* π/4 *) (* 0.785398 *) You can get this same answer using Region functionality by first making a RegionPlot, converting it to a MeshRegion and ...


1

r = ImplicitRegion[{y + z <= 4, y <= 4 - x^2, y >= 0 , z >= 0}, {x, y, z}]; i = HoldForm[Integrate[1, {x, -2, 2}, {y, 0, 4 - x^2}, {z, 0, 4 - y}]]; cp = ContourPlot3D[{z == 0, y == 0, 4 - y - x^2 == 0, y + z == 4}, {x, -2, 2}, {y, 0, 4}, {z, 0, 4}, Mesh -> None, ContourStyle -> {Red, Green, Blue, Orange}, PlotLegends -> ...


5

Plot3D[{4 - y, 4 - x^2, 0}, {x, -2, 2}, {y, 0, 4.1}, PlotStyle -> {{Blue, Opacity[0.7]}, {Yellow, Opacity[0.4]}, {Green, Opacity[0.4]}}, AxesLabel -> Automatic, Mesh -> None, RegionFunction -> Function[{x, y, z}, 0 <= z <= Min[4 - x^2, (4 - y)]]] ParametricPlot3D: ParametricPlot3D[{{x, y, ConditionalExpression[4 - x^2, 4 - x^2 ...


7

Since there are three constants and all of them are crucial in the computation we should somehow restrict possible values of the constants. One can see that the integral is quite different in three distinct cases b < 0, b == 0 and b > 0: TraditionalForm[ int[A_, b_, r_] = Piecewise[{Integrate[(1 - (1/(1 + A x^(-b)))) x, {x, 0, r}, ...


1

An alternative is to calculate the corresponding indefinite integral first and then plug in the bound: int[x_] = Integrate[(1 - (1/(1 + A x^(-ao)))) x, x]; int[r] - int[0] // FullSimplify 1/2 r^2 Hypergeometric2F1[1, 2/ao, (2 + ao)/ao, -(r^ao/A)]


1

As mentioned in the comment that assuming the exponent a0>0 will help to speed things up and will avoid the complex part. I tried to evaluate the integral in both mathematmica and maple, Integrate[(1 - (1/(1 + A x^(-ao)))) x, {x, 0, r}] The output turn out be unevaluated integral but as suggested by @Bill, if assume a0>0 then we have an answer ...


5

Identities from MathematicalFunctionData can be useful when Mathematica can't seem to rewrite things in a form we want. whit[k_, m_, z_] = Activate[MathematicalFunctionData[ WhittakerW, "AlternativeRepresentations"][[4]][k, m, z][[1, 2]]] int = FullSimplify[whit[0, a, x] whit[1, b, x]] Integrate[int/x, x] (* large output of HypergeometricPFQs *) ...


3

Mathematica can't this integral to solve,but we can convert WhittakerW function to BesselI function.I'm use Maple to convert. $$W_{0,a}(x)=\frac{1}{2} \sqrt{\pi } \sqrt{x} \csc (\pi (a+1)) \left(I_a\left(\frac{x}{2}\right)-I_{-a}\left(\frac{x}{2}\right)\right)$$ $$W_{1,b}(x)=\frac{1}{2} \sqrt{\pi } \sqrt{x} \csc (\pi b) \left(-\frac{1}{2} x ...


3

I suspect that you may have accidental defined some parameters such as Γ and ω0 earlier, because they don't appear in the Out[64] line in your image. To clear all definitions, it is sometimes helpful to simply quit the kernel. You can find this option under the "Evaluation" menu. You also don't need the Evaluate[] line. You can simply call n[ω, ω0, Γ]. The ...


2

If you look at the documentation for Series Then you can see that Series[f,{x,Subscript[x, 0],n}] generates a power series expansion for f about the point x=Subscript[x, 0] to order (x-Subscript[x, 0])^n So if you want more terms, then simply change n to something else. Like 5, for example. In[6]:= Series[(1 - Cos[x])/x, {x, 0, 5}] ...


3

This is your definition: m = 1; u[x_, t_] = (t^\[Alpha]*x*(2*t^2 + (1 + \[Alpha])*(2 + \[Alpha])))/ Gamma[3 + \[Alpha]]; Your code makes 3.19 seconds on Mma10.4.1 DUt = FullSimplify[(1/Gamma[m - \[Alpha]])*Integrate[(t - \[Tau])^(m - \[Alpha] - 1)*D[u[x, \[Tau]], {\[Tau], m}], {\[Tau], 0, t}], Assumptions -> {m - 1 < \[Alpha] < m, t ...


5

Sometimes they're equal: Block[{a = 2, b = 4}, {NIntegrate[E^(I a x)/(x^2 - b^2), {x, -Infinity, -b - I, b + I, Infinity}], -((π (I Abs[b] Cos[a b] + b Sin[a b]))/b^2) // N} ] (* {-0.77704 + 0.114275 I, -0.77704 + 0.114275 I} *) Kidding aside, perhaps you should specify PrincipalValue -> True (which I just noticed, belatedly, than Daniel ...


6

This integral has not a value in Riemann's sense, then it has not a value independent of your particular problem, as many people already commented above. Hence, it is better to use the residue theorem, and decide whether you want to include the residue from the pole at +b, at -b, both ou none. Therefore: rplus = Residue[E^(I a x)/(x^2 - b^2), {x, b}] ...


3

Let, $$ f=\frac{z-e^{i \pi/2 n}}{z^{2 n}+1} $$ Then, in Mathematica code, the following seems to work, Limit[f, z -> Exp[(I Pi)/(2 n)], Assumptions -> n >= 1/2] which gives the result, $$ -\frac{e^{i \pi/2 n}}{2n} $$ The problem isn't that Mathematica is handling the $0/0$ limit incorrectly. It's that Mathematica, without additional information, ...


2

happy fish ,he said "nth derivative is not natively supported" Yes it's true,but from here. Method1: For simple functions you can use InverseFourierTransform. f[s_] := Sin[s]; nthDeriv1[f_, s_, n_] := FullSimplify[InverseFourierTransform[(-I k)^n FourierTransform[f, s, k], k, s], {n \[Element] Integers, n > 0}] nthDeriv1[f[s], s, n] $$\sin ...



Top 50 recent answers are included