Tag Info

New answers tagged

3

The integral is path-dependent (in the complex plane). Help it out by specifying a real way-point: Integrate[Sqrt[1 + x^3], {x, -1, 0, 3}] N[%] (* (Sqrt[π] Gamma[1/3])/(6 Gamma[11/6]) + 3 Hypergeometric2F1[-(1/2), 1/3, 4/3, -27] 8.18272 *) Check: NIntegrate[Sqrt[1 + x^3], {x, -1, 3}] (* 8.18272 *) Update After reading Mark Adler's ...


6

It is a bug. Rubi package gets it right: Mathematica: r = Integrate[Sqrt[1 + x^3], {x, -1, 3}] N[%] Rubi r2 = Int[Sqrt[1 + x^3], x]; Limit[r2, x -> 3] - Limit[r2, x -> -1] N[%] (*8.18272 + 1.11022*10^-16 I*) Chop[%] (*8.18272*) Looking at Out[91] and Out[94], we see they are not the same. Mathematica is missing the ellipticK ...


0

For this particular case: (Integrate[2 f[x], {x,0,1}] - 2 Integrate[f[x], {x,0,1}]) /. (Integrate[x_*f[h_], z_]) :> x* Integrate[f[h], z]


3

Use the Jens trick: f /: Integrate[f[x_], x_] := if[x]; SetAttributes[if, {NumericFunction}]; And now FullSimplify[Integrate[2 f[x], {x, 0, 1}] - 2 Integrate[f[x], {x, 0, 1}]] (* 0 *) You can read more about this in here


8

You need to define OverDot[\[Theta]] to be the derivative of \[Theta] with respect to some variable t; otherwise there is no way for Mathematica to know the relation between \[Theta] and OverDot[\[Theta]]. OverDot[\[Theta][t_]] := D[\[Theta], t]; Then D[OverDot[\[Theta][t_]]- \[Theta], \[Theta]] -1 and D[OverDot[\[Theta][t_]]- \[Theta], ...


3

You are almost certainly going to need to evaluate test numerically, so let's just use NIntegrate from the start. Clear[e, a, p, s, t] e[t_] := (E^(-t^2)) Cos[0.1 t]; a[t_?NumericQ] := NIntegrate[e[x], {x, 0, t}]; p[t_?NumericQ, tau_?NumericQ] := NIntegrate[a[x], {x, t - tau, t}]; s[t_?NumericQ, tau_?NumericQ] := NIntegrate[(a[x])^2, {x, t - tau, t}] + ...


4

It is unclear why you believe that there is a problem with the presence of the error function in a[t]. e[t_] = E^(-t^2) Cos[t/10]; a[t_] = Integrate[e[x], {x, 0, t}]; a[t] is readily integrated p[t_, tau_] = Integrate[a[x], {x, t - tau, t}] (1/(80*E^(1/400)))* (20*(E^(1/20 - It)^2 + E^(1/20 + It)^2 - E^(1/20 + I*(t - ...


1

In case you have expression like: expr =a Sin[x Exp[x]]; I would use: r = Integrate[expr,x]; If[FreeQ[r, Integrate, -1], Print["passed"], Print["failed"]]


4

(1) Replace each variable by itself times a new variable (same new variable for all replacements). (2) Take nth derivative with respect to the new variable. (3) Set value of new variable to 1. I illustrate with n=2 and three variables. vars = {x, y, z}; D[(f @@ vars) /. Thread[vars -> t*vars], {t, 2}] /. t -> 1 (* z*(z*Derivative[0, 0, 2][f][x, y, ...


4

Try the following way. This: lst = Select[ Flatten[Table[{i, j, k, l}, {i, 0, 3}, {j, 0, 3}, {k, 0, 3}, {l, 0, 3}], 3], Abs[Total[#]] == 3 &] (* {{0, 0, 0, 3}, {0, 0, 1, 2}, {0, 0, 2, 1}, {0, 0, 3, 0}, {0, 1, 0, 2}, {0, 1, 1, 1}, {0, 1, 2, 0}, {0, 2, 0, 1}, {0, 2, 1, 0}, {0, 3, 0, 0}, {1, 0, 0, 2}, {1, 0, 1, 1}, {1, 0, 2, 0}, {1, 1, 0, ...


2

For example for f[___]= Sin[ x y z w] l = Flatten[ Permutations /@ (PadRight[#, 4] & /@ IntegerPartitions[3]), 1] (Derivative[##][f][x, y, z, w] & @@@ l) /. f -> (Sin[#1 #2 #3 #4] &)


11

Yes, this is a bug in the more general function RegionMeasure. I knew there were some edge cases in the handling of inexact numberics, but I was unaware of such a simple example. I will forward this bug internally. Workarounds include using the parametric (2-argument) form of ArcLength, and using DiscretizeRegion to preprocess regions before sending them ...


2

Fixed in 10.0.2. It now return unevaluated


3

Fixed in 10.0.2 Probability[a^2 + b^2 + c^2 + d^2 + e^2 + f^2 + g^2 < 1, {a, b, c, d, e, f, g} \[Distributed] UniformDistribution[{{0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}}]]


3

Since your title refers to Lagrange optimization, I'm guessing you're seeking to find the maximum and minimum of a function f[x,y] subject to a constraint g[x,y]=0. f[x_, y_] := x^3 - x*y + y^2 + 3; g[x_, y_] := x^2 + 2*y^2 - 1; myConstraintEq = Solve[g[x, y] == 0, {x, y}] // Quiet; Show[ Plot3D[f[x, y], {x, -2, 2}, {y, -2, 2}, PlotStyle -> ...


0

Mathmatica tells me that it does not converge This has been fixed in V 10.0.2. On windows 7, 64 bit. Integrate[E^(-((201 x1^2)/101)) x1^2 (15 - 20 x1^2 + 4 x1^4) (5913508078417951503 + 1124782662003060300000 x1^2 - 2983951574394000000000 x1^4 + 2591462040000000000000 x1^6 - 797900000000000000000 x1^8 + 80000000000000000000 ...


0

There are many ways to plot multiple curves. One is to use ContourPlot with only the zero-contour shown, Contours -> 0. ContourPlot[{x^3 - x*y + y^2 + 3, x^2 + 2*y^2 - 1}, {x, -3, 2}, {y, -3, 2}, Contours -> 0, PlotLegends -> Placed[LineLegend["Expressions"], {Right, Right}]] There appears to be no intersection for your expressions.


4

confirming my comment.. Integrate[ Sqrt[ 1 + a (x - 1) ] , {x, -1, 1}], Integrate[ Sqrt[ 1 + a (x - 1) ] , {x, -1, 1}, Assumptions -> True] Integrate[ Sqrt[ 1 + a (x - 1) ] , {x, -1, 1}, GenerateConditions -> True] Integrate[ Sqrt[ 1 + a (x - 1) ] , {x, -1, 1}, Assumptions -> {y == 3}] Integrate[ Sqrt[ 1 + a (x - 1) ] , {x, -1, 1}, ...


3

How about this? f[x2] /. First @ DSolve[{f'[x] == y'[x], f[x1] == 0}, f, x] (* -y[x1] + y[x2] *)


4

Normally in Mathematica, you just need to type the integral and it will evaluate without needing to specify a substitution or anything. Unfortunately Mathematica does not know how to do this integral. I agree with what george2079 said in the comments: This is an example where it is far easier to do the substitution by hand and feed the integral in terms ...


2

D[(Log[x] + Exp[4 (x - 1)])^15, {x, 3}] /. x -> 1


2

As pointed out by @Sektor Limit[(1 - E^-x)^E^x, x -> Infinity] 1/E The precedence of the operators causes this to be evaluated as Limit[(1 - E^-x)^(E^x), x -> Infinity] 1/E However, you can force a different evaluation using parentheses Limit[((1 - E^-x)^E)^x, x -> Infinity] 1 Presumably, you did something like the latter.


7

a = -0.06; b = 0.04; c = 0.1; d = 0.54; f = (a x^3 + b x^2 + c x + d) Sqrt[1 - x^2]; To view the volume, you can use: RevolutionPlot3D[f, {x, -1, 1}, RevolutionAxis -> {1, 0, 0}] the volume is: v = Integrate[Pi f^2, {x, -1, 1}] (*1.263*)


6

See : Language Overview: http://reference.wolfram.com/language/guide/LanguageOverview.html and Wolfram Language Syntax: http://reference.wolfram.com/language/guide/Syntax.html Refer to the documentation frequently until you learn the language syntax. $Version "10.0 for Mac OS X x86 (64-bit) (September 10, 2014)" a = -0.06; b = 0.04; c = 0.1; d = ...


2

Let's help Mathematica out a little... first, the term Sn has a nice closed form solution, and an even simpler limit Limit[1/6 (-6 + π^2 - 6 PolyGamma[1, 2 + n]), n -> Infinity] 1/6 (-6 + π^2) which is about 0.644934. Next, observe that the term SSn has two parts. Taking just the part that involves the sums of the Fibonacci series, Sum[Fibonacci[n], ...


1

Very helpful discussion in progress about work-arounds HERE: How to code around known MMa special-case failures?


12

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


1

grad = Grad[x^2 - y^2, {x, y}]; VectorPlot[{grad[[2]], -grad[[1]]}, {x, -2, 2}, {y, -2, 2}] grad2 = Grad[Sin[x] Sin[y], {x, y}]; VectorPlot[{grad2[[2]], -grad2[[1]]}, {x, -2, 2}, {y, -2, 2}]



Top 50 recent answers are included