Tag Info

Hot answers tagged

11

I've got a theory.... Let's try to get the antiderivative: Integrate[(1 + 16*Tan[2*x - y]^2)/(1 + 4*Tan[2*x - y]^2), x, Assumptions -> y \[Element] Reals] (*returns 5 x - (5 y)/2 - ArcTan[2 Tan[2 x - y]] *) Seems legit. You can test with D[5 x - (5 y)/2 - ArcTan[2 Tan[2 x - y]], x] and plot or rearrange. This antiderivative is technically correct, ...


9

Converting to polar coordinates helps with the xy integral: Assuming[θ ∈ Reals && h ∈ Reals && h > 0 && x ∈ Reals && y ∈ Reals && z ∈ Reals && z > 0, Integrate[((7695 h x^2 y^2 z^6 Sin[2 θ]) / (2 π (h^2 + x^2 + y^2)^(5/2) (h^2 + x^2 + y^2 + 2 h z + z^2)^8) /. {x -> r Cos[t], y -> r ...


8

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


8

It has to do with the default behavior of GenerateConditions in multivariate integrals. Setting it explicitly to True will help in this case. Some explanation may be found here or here. The gist is that, for multiple integration, automatically checking conditions and issuing provisos for all but the final integration is typically both too costly (in speed) ...


7

It seems, that findExponentialGeneratingFunction would be equivalent to FindGeneratingFunction of the sequence {a1/0!,a2/1!,a3/2!,...}. Therefore findExponentialGeneratingFunction = FindGeneratingFunction[#1/(Factorial /@ Range[0, Length@#1 - 1]), #2] & findExponentialGeneratingFunction[{1,1,1,1,1,1,1,1},x] (* Exp[x] *)


7

The "trick" which works frequently when Mathematica refuses to calculate a definite integral is to calculate first the indefinite integral, then take the limits at the ends of the integration interval and subtract the results. Here we go. Let the integrand be f = -((cA Log[1 + mgl^2/sa1])/(-1 + x)) + (cA Log[-(sa1/(-mgl^2 - sa1))])/(1 - x) + (cA cF Log[-1 ...


7

evenFQ[f_] := Simplify[f[t] - f[-t]] === 0 oddFQ[f_] := Simplify[f[t] + f[-t]] === 0 Examples: ef[x_] := x^2 of[x_] := x^3 evenFQ/@ {ef, of} {True, False} oddFQ/@ {ef, of} {False, True} evenFQ /@ {# &, Im, Sin, Tan, Sinh, Erf} {False, False, False, False, False, False} oddFQ /@ {# &, Im, Sin, Tan, Sinh, Erf} { True, ...


6

[Edit notice: I'll put the gist up front.] 10 π is not wrong With proper assumptions given, the integral evaluates as desired by the OP, to 6 π. Without them, it gives one of the correct values of the integral, 10 π, the one that in some sense is more likely, but without the correct conditions attached. (One may well argue that is a bug. However, ...


5

This s not an answer but an extended comment about results with v10.1 $Version "10.1.0 for Mac OS X x86 (64-bit) (March 24, 2015)" Integrate[1/(x y z), {x, 0, 1}, {y, 0, 1}, {z, 0, 1}] 0 Integrate[1./(x y z), {x, 0, 1}, {y, 0, 1}, {z, 0, 1}] 0 However,NIntegrate gives the a large result in either case with convergence warnings ...


5

Products are polynomials in x: Table[Expand[Product[x^k*(1-x^k), {k, 1, n}]], {n, 1, 3}] (* {x - x^2, x^3 - x^4 - x^5 + x^6, x^6 - x^7 - x^8 + x^10 + x^11 - x^12} *) Integration of polynomials is easy: Table[Integrate[Expand[Product[x^k*(1-x^k), {k, 1, n}]], x], {n, 1, 3}] (* {x^2/2 - x^3/3, x^4/4 - x^5/5 - x^6/6 + x^7/7, x^7/7 - x^8/8 - x^9/9 + x^11/11 ...


5

Rather than imposing x>0 one can also do FullSimplify[ ForAll[x, myOddFunction[x] == myOddFunction[-x]]] which yields False.


4

You need Simplify with an assumption: myOddFunction[x_] := x^3; Simplify[ Equal[myOddFunction[x], myOddFunction[-x]], x > 0 ] False Refine also works in this case, again with the appropriate assumption: Refine[Equal[myOddFunction[x], myOddFunction[-x]], x > 0] False


4

Doing the z integration first it takes less than a minute to run Timing[ Assuming[\[Theta]\[Element]Reals&&h\[Element]Reals&&h>0&&x\[Element]Reals&&y\[Element]Reals&&z\[Element]Reals&&z>0, Integrate[r*Integrate[(7695*h*x^2*y^2*z^6*Sin[2*\[Theta]])/(2*Pi*(h^2 + x^2 + y^2)^(5/2)*(h^2 + x^2 + y^2 + 2*h*z ...


3

I would localize the variables inside the DynamicModule created by the Manipulate by using the ControlType -> None (or simply None for short) specification. This use is discussed here: What does None mean in a control specification for Manipulate? ControlType -> None Vs. Module inside Manipulate (i.e. making everything local) Code: ...


3

Try this ClearAll[r, phi, th] x = r[t]*Cos[phi[t]]*Sin[th[t]]; D[x, t] (* -r[t] Sin[phi[t]] Sin[th[t]] Derivative[1][phi][t] + Cos[phi[t]] Sin[th[t]] Derivative[1][r][t] + Cos[phi[t]] Cos[th[t]] r[t] Derivative[1][th][t] *) Expressions like r = r[t]; can lead to infinite recursions.


3

Edit: see the bottom of this post for the best solution. The documentation for CoefficientList says: The dimensions of the array returned by CoefficientList are determined by the values of the Exponent[poly, vari]. ser1 = Series[ArcTan[x]/(1 - x^2), {x, 0, 10}]; ser2 = Series[ArcTan[x]/(1 - x), {x, 0, 10}]; Exponent[ser1, x] Exponent[ser2, x] 9 ...


2

Log[2] + Sum[(-1)^(k + 1) (x - 2)^k/(k 2^k), {k, 1, Infinity}] Log[x] Since Log is complex or unbounded for non-positive argument, the maximum difference is undefined for x <= 0 Log /@ {0, -1/4} // InputForm {-Infinity, I*Pi - Log[4]} The maximum difference will be arbitrarily large as x gets arbitrarily close to 0+. Clear[f] f[x_, n_] := ...


2

Oddly, if you follow the hints given in the ConditionalExpressions you can get pointed to the right answer although constrained to an overly restrictive region. $Version "10.1.0 for Mac OS X x86 (64-bit) (March 24, 2015)" expr = (1 + 16 Tan[2 x - y]^2)/(1 + 4 Tan[2 x - y]^2); Integrate[expr, {x, 0, 2 Pi}] ConditionalExpression[9*Pi, -(Pi/2) ...


1

As stated in the OP Mathematica finds this value of the integral within seconds f0 = Integrate[x^2 Log[1 - E^-x], {x, 0, \[Infinity]}] (* Out[21]= -(\[Pi]^4/45) *) Most probably Mathematica employs this standard procedure: 1) solve the indefinte integral, i.e. find an antiderivative 2) check continuity of the antiderivative 3) use the fundamental ...


1

Integrate and NIntegrate agree on this matter: Table[Integrate[(1+16 Tan[2 x-y]^2)/(1+4 Tan[2 x-y]^2),{x,0,2Pi}],{y,0,10,2}] (*==> {6π,6π,6π,6π,6π,6π}*) Table[NIntegrate[(1+16 Tan[2 x-y]^2)/(1+4 Tan[2 x-y]^2),{x,0,2Pi}],{y,0,10,2}] (*==> {18.8496,18.8496,18.8496,18.8496,18.8496,18.8496}*) N[6Pi] (*==> 18.8496*)


1

This is a stab at cleaning it up. I put in table form so you can see how to loop over a. Needs["NumericalCalculus`"] Table[ g[t_] = {-(a + 2*Cos[2*t])*Sin[3*t], (a + 2*Cos[2*t])*Cos[3*t], 2*Sin[2*t]}; dg[t_] = If[t - 2*Pi <= 0, g'[t], g'[2*Pi]]; tfn = Module[{s}, NDSolveValue[{t'[s] == 1/Norm[dg[t[s]]], t[0] == 0, ...



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