Tag Info

Hot answers tagged

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


7

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


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


6

Large t Approximation Because this is a neutral delay integral-differential equation, solving it may seem very difficult at first glance. However, the term 1/5^t makes the integral negligible for t greater than about 2. So, with the integral ignored for large t, the equation can be reduced to x[t] - x[t - 1]/(2 E) = c[2] t^2 + c[1] t + c[0] where the ...


5

No, it is not doing a Gram-Schmidt procedure. One way to note that this is distinct from Gram-Schmidt is that Gram-Schmidt produces an orthonormal basis, whereas the example outputs in the Documentation Center page for LatticeReduce are neither normalized nor orthogonal. Instead, LatticeReduce returns a basis $B$ comprised of linear combinations of integer ...


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


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

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


3

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


3

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


2

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] &)


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.


2

Mathematica solves the equivalent differential equation: y[t] /. First@DSolve[{y'[t] == f'[t], y[0] == 0}, y, t] (* -f[0] + f[t] *)


2

xcoord = {6371.1, 6371.59, 6372.06, 6372.51} ; ycoord = {0, 11.8192, 23.2572, 34.342}; fe = {24.0401, 24.3053, 24.56, 24.8038}; data = Transpose[{xcoord, fe}]; f = Interpolation[data]; Show[ListLinePlot[data, Mesh -> All], Plot[f[x], {x, First@xcoord, Last@xcoord}]] NIntegrate[Sqrt[1 + f[x]^2], {x, First@xcoord, Last@xcoord}]


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


2

Fixed in 10.0.2. It now return unevaluated


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}]


1

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


1

It depends how you want to fit the function der = {24, 24.5, 25, 25.4}; fit = Fit[der, {1, x}, x] Integrate[Sqrt[1 + fit^2], {x, 65, 68}] (*164.442*) fit = Fit[der, { 1, x, x^2}, x] NIntegrate[Sqrt[1 + fit^2], {x, 65, 68}] (*142.779*) Or use fit fit = Interpolation[der]; NIntegrate[Sqrt[1 + fit[x]^2], {x, 65, 68}] (*13250.6*) You see the ...



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