# Tag Info

7

Excerpt from the license agreement, http://www.wolfram.com/legal/agreements/wolfram-mathematica.html: Limited Warranty and Disclaimer WRI warrants that the Product shall be free from defects in the physical media for a period of 90 days following the date of purchase when used under normal conditions. You acknowledge that WRI shall provide, as Your ...

7

The answer is emphatically - no, the correct integral should not involve absolute values. To fully understand what's going on, it should suffice to examine the simpler situation Integrate[1/z, z] (*Out: Log[z] *) Presumably, the expected answer is, as we learn in calculus 1: $$\int \frac{1}{z} \, dz = \ln\left|z\right|+c.$$ As Junho points out in his ...

6

The result Mathematica returns may not be completely general but it is strictly true. Reduce[(x^2 - x + 5)/((x - 2)*(x - 1)*(x + 3)) == D[(-5 Log[1 - x]/4 + 7 Log[2 - x]/5 + 17 Log[3 + x]/20), x]] True

5

Clear["Global*"] expr = y^2 - 2 x^2 y + 6 x^3 - 3*x*y + 2 y - 6; Integrate[ expr Boole[y >= 2*x^2 - 2 && y <= 3*x], {x, -Infinity, Infinity}, {y, -Infinity, Infinity}] -(36625/2688) Reduce[y >= 2*x^2 - 2 && y <= 3*x, y] (x == -(1/2) && y == -(3/2)) || (-(1/2) < x < 2 && -2 + 2 x^2 ...

4

You could use NIntegrate on inexact numbers. It monitors precision and you won't get such catastrophic round-off error; and it will probably be faster as well. Something like this will set the WorkingPrecision to the minimum precision of the inputs, if the arguments are inexact numbers; otherwise it uses the OP's exact code: Clear[PPP]; ...

4

I think your definition of d is not properly generalizable because the list dimensions don't match when doing higher derivatives. So I instead use a simpler definition of the Gateaux derivative from Wikipedia which does exactly the same thing as what you're trying to do. I call it gatD, and it takes the operator, the function u and a List of test functions. ...

4

The Package HypExp does exactly that. Here is the link to paper for what I believe was the last extension. After digging around a bit, the package files should be available here ( Edit freely available link) Several years ago, there has been some work on the simplification of polylogarithms into a Hopt Algebras, which simplifies the reduction of the ...

3

The problem is the ByteCount of H is ~630 KB, so Simplify will run forever. ComplexExpand[ With[{z = x + I y}, E^-Sqrt[z^2]/(Sqrt[z^2]+Sqrt[z^2] Cosh[Sqrt[z^2]]+Sqrt[z^2] Sinh[Sqrt[z^2]]) ] ] // ByteCount (* 629392 *) Here are two partial workarounds. I call these workarounds because it proves H is not analytic, but it doesn't derive it i.e. we ...

3

The Method option in LQOutputRegulatorGains is not documented yet and seems to be going through several iterations. This is what works for the different versions. v8: Method -> {"RiccatiSolveOptions" -> {Method -> "Eigensystem"}} v9: Method -> {"Riccati", {Method-> "Eigensystem"}} v10:Method ->{"Riccati"->{Method-> ...

3

If I understand your question correctly - as judged from the text typed - the answer should read (writing - 6x instaed of just - 6 as some others have done, put the function in brackets before multiplying with Boole, also use +- Infinity which is better than some arbitrary (?) finite value like +-2) Integrate[(y^2 - 2*x^2*y + 6*x^3 - 3*x*y + 2*y - 6*x)* ...

3

Amplifying on the answer by Chenmingi: Boole will automatically restrict the integral to the appropriate region so you can integrate from -Infinity to Infinity for each of the variables. int1 = Integrate[ (y^2 - 2 x^2 y + 6 x^3 - 3*x*y + 2 y - 6) * Boole[y >= 2*x^2 - 2 && y <= 3*x], {x, -Infinity, Infinity}, {y, -Infinity, Infinity}] ...

3

Yes, there is such a way. Try this, for example. First define a function to integrate; int[expr_] := Integrate[expr, {z, -h/2, h/2}, {\[Theta], 0, 2 \[Pi]}] Then map this function onto the terms of your expression: r[\[Theta], z] = Sqrt[(h/2)^2 - z^2] + g[\[Theta]] - h/2; Map[int, Expand[1/2 r[\[Theta], z]^2]] This results in: \int_0^{2 \pi } ...

2

By not telling Mathematica otherwise, you have only a few significant digts in the second example, so the result loses accuracy quickly. You can tell Mathematica that a number has more precision than the digits you present, such as PPP[1000, 2000, 0.4951000, 0.505`1000] See Precision, Accuracy, Numerical Precision, and Controlling the precision and ...

2

Reduce[x^2+y^2==(2 x^2+2 y^2-x)^2,{y},{x},Reals] -((3 Sqrt[3])/8) <= y <= (3 Sqrt[3])/8

2

eq[0] = {Derivative[1][Subscript[x, 0]][t] == Subscript[y, 0][t], Derivative[1][Subscript[y, 0]][t] == 6 Subscript[x, 0][t]^2 - a/2}; ru[n_] := Block[ {r = {Subscript[x, n - 1][t] :> Subscript[x, n][t] Subscript[y, n][t], Subscript[y, n - 1][t] :> Subscript[y, n][t]}}, Flatten[{r, D[#, t] & /@ r}]] eq[n_] := Equal @@@ ...

2

Edit This edited answer reflects comments made on my original version by the OP. Clear[rulelist, rule]; rulelist = {{tt -> 1, zz -> 1}, {tt -> 1, zz -> 2}, {tt -> 2, zz -> 1}, {tt -> 2, zz -> 2}}; Table[rule[i] = rulelist[[i]], {i, 4}]; To see where you went wrong let's look at what Derivative returns when it is given your version ...

2

I hope this is helpful (if I interpret your aim correctly): This is a little more challenging for your particular function. g[x_, y_] := {-5.4 E^(-2.25 ((-4 + x)^2 + (-2.5 + y)^2)) (-4 + x) - 6.4 E^(-4 ((-3.5 + x)^2 + (-1.5 + y)^2)) (-3.5 + x) - 8 E^(-4 ((-3 + x)^2 + (-3.5 + y)^2)) (-3 + x) - 9. E^(-9 ((-2.5 + x)^2 + (-1.5 + y)^2)) (-2.5 + x) - ...

2

Now in V10 we have ImplicitRegion and RegionCentroid to do this easily: reg = ImplicitRegion[y > 0 && y <= 1 - x^2/4, {x, y}]; Then: RegionCentroid[reg] {0, 2/5}

2

This is a very nice problem. If I may dispense with the notation for random variables as $f$ and $k$, and refer to them instead as $X$ and $Y$ ... The Problem Let $X \sim Uniform(0,1)$ and $Y \sim Uniform(2,5)$ be independent random variables, with joint pdf $f(x,y) = \frac13$: f = 1/3; domain[f] = {{x, 0, 1}, {y, 2, 5}}; We seek a closed-form ...

2

I figured out a way to answer a related simpler question, which is Expectation[ f \[Conditioned] f + \[Alpha]*k > p], {f, k} \[Distributed] UniformDistribution[{{a, b}, {k1, k2}}] Mathematica has trouble with this computation, but if you realize that it is the centroid of a polygon, you can use a feature of Mathematica to get a (long) answer ...

2

Dt is useful for doing substutitions. You can think of Dt[x] as the differential of x. Substitutions can be performed with ReplaceAll (/.) and rules like {x -> x1 y1, y -> y1}. Then Solve can be used to solve for Dt[x1] and Dt[y1]. Solve returns a solution in the form of a Rule, so we replace Rule with Equal to get another differential equation. ...

2

This is also not an answer but a brief study in \$Version "8.0 for Microsoft Windows (64-bit) (October 7, 2011)" which might be of interest. It considers three methods of calculating the requested probability. It shows that in this version there is no negative probability but there is still a "critical number" which amounts to 8. For n = 8 the ...

1

Tweak Solution Since Seth has provided 2 answers, I thought I might also put up another answer. My motivation for separating this from my original answer is that ... my original answer is a self-contained mathematical solution in transformations of random variables, essentially striving to side-step Mathematica's use of Boole which was not working, ...

1

you don't need to use m[x_,y_]:= simply as follow: m = 0.9*Exp[-((x - 1)^2 + (y - 1)^2)] + 0.5 Exp[-(3^2 ((x - 2.5)^2 + (y - 1.5)^2))]; Plot3D[m,{x, 0, 5}, {y, 0, 5}, PlotRange -> All]

1

I suspect there may not be a closed form expression (I have not looked at it hard enough). If the aim is to not analytical but numerical, I post the following for illustration (apologies if not the intent of question): f[x_, y_] := NIntegrate[ Log2[t + 1] Exp[-(x - Log[t])^2/(2 y^2)]/(Sqrt[2 Pi] t y), {t, 0, Infinity}] rv[a_, b_, n_] := ...

1

@Daniel Lichtblau's comment seems like an answer that is worth putting in an answer: (1) Integrate will not catch conditions that are discrete. (2) As was pointed out already in comments, the result is correct anyway; the singularity is removable (e.g. via Limit). Edit: I might add that GenerateConditions might yield a ConditionalExpression but not a ...

1

Here is a fully automated way of solving your problem. To streamline the notation, I redefine your initial equations using index 0. Define the initial equations. eqns = {Derivative[1][x[0]][t] == y[0][t], Derivative[1][y[0]][t] == 6 x[0][t]^2 - a/2}; Define the transformation rule. transfrule = {x[n_] :> (x[n + 1][#] y[n + 1][#] &), y[n_] :> ...

1

The idea: eq = {x'[t] == y[t], y'[t] == 6 x[t]^2 - a/2} eq2 = eq /. x -> (x1[#] y1[#] &) /. y -> y1 { y1[t] x1'[t] + x1[t] y1'[t] == y1[t], y1'[t] == -(a/2) + 6 x1[t]^2 y1[t]^2 } Thread[ {x1'[t], y1'[t]} == First[ {x'[t], y'[t]} /. Solve[eq, {x1'[t], y1'[t]}]] ] x1'[t] == 1 + (a x1[t])/(2 y1[t]) - 6 x1[t]^3 y1[t] y1'[t] ...

1

It's a little hard to tell what you are looking for, but here is a try. The first step can be written in almost exactly the same way you have above: x1[t] = x[t]/y[t]; y1[t] = y[t]; D[x1[t], t] /. {D[x[t], t] -> y[t], D[y[t], t] -> 6 x[t]^2 - a/2} D[y1[t], t] /. {D[x[t], t] -> y[t], D[y[t], t] -> 6 x[t]^2 - a/2} This returns the same equations ...

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