Tag Info

New answers tagged

2

I think I solved this problem. The error message was due to the fact that Mathematica cannot perform the internal integration, so I split the two integrations and used NIntegrate instead of the symbolic integration: p[z1_?NumericQ, R_?NumericQ, z_?NumericQ] := -NIntegrate[ BesselK[0, x/Ld]*x* ArcSin[(2*x)/( Sqrt[(z1)^2 + (x + 7.6)^2] + ...


5

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


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


0

I spent some additional time on this problem and believe I MAY have solved it in a pretty general way with Mathematica. But I'm not sure and I still think there's more help needed on the problem. I'm going to use wolfies' substitution of the conventional x and y for my earlier used f and k. Basically, what we are after is the expected value of x over a ...


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}


0

In Mathematica 10, this can be easily computed using built-in functionality. Using Silvia's answer's polygon and function: polygonPts3D = { {-0.902757, -0.116805, 0}, {0.203504, -0.972294, 0}, {0.849893, 0.414192, 0}, {0.374057, 0.835407, 0}, {-0.907079, 0.352119, 0} }; f[x_,y_,z_] := ...


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


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


0

Vladimir, there is one simple solution: lst = Table[{a, NIntegrate[BesselJ[0, x - a] BesselJ[0,x + a], {x, -\[Infinity], \[Infinity]}, PrecisionGoal -> 5, Compiled -> True]}, {a, 0.84, 0.85, 0.0001}] This visualizes the result: ListPlot[lst, Frame -> True, FrameLabel -> {Style["a", 16], Style["Integral", 16]}, GridLines -> ...


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


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


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


0

The way you wrote it it obviously vanishes, since all the conditions are on $y^2$ while the integrand is $y$ (so whatever the $y>0$ bit contributes is cancelled by the $y<0$ bit). If you meant for $y>0$ to be true, then eg Integrate[y*Boole[z^2 + 6 < y^2] Boole[y^2 < 5 z] Boole[0 < y], {y, -\[Infinity], \[Infinity]}, {z, ...


0

You can also depict the expected value nicely as a function of Mu and Sigma using Plot3D. px = Simplify[PDF[LogNormalDistribution[Mu, Sigma], x], x > 0] E^(-((Mu - Log[x])^2/(2 Sigma^2)))/(Sqrt[2 \[Pi]] Sigma x) Plot3D[NIntegrate[Log2[1 + x] px, {x, 0, \[Infinity]}], {Mu, -5, 10}, {Sigma, .2, 2}, AxesLabel -> {Mu, Sigma, EY}] PS: Reminds me ...


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


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


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


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]


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


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


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


0

First, you need to use SetDelayed(:=),not Set(=) when we define functions. Clear["Global`*"] f[x_, y_] := Evaluate@Simplify[ PDF[MultinormalDistribution[{10, 8}, {{9, 0.5 1.5 3}, {0.5 1.5 3, 2.25}}], {x, y}]]; F[x_, y_] := Evaluate@Simplify[ CDF[MultinormalDistribution[{10, 8}, {{9, 0.5 1.5 3}, {0.5 1.5 3, 2.25}}], {x, y}]] Fx[x_] := ...


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



Top 50 recent answers are included