Tag Info

Hot answers tagged

10

$$\mathbb{P} \big(\sum_{i=1}^{m} (A_i + S_i) \le L < \sum_{i=1}^{m+1} (A_i + S_i) \big) = \frac{\mu ^m (2 \lambda +\mu )}{2^{m+1} (\lambda +\mu )^{m+1}}$$ Observing: d1 = TransformedDistribution[ a + s, {a \[Distributed] ExponentialDistribution[λ], s \[Distributed] ExponentialDistribution[μ]}] (* ...


6

This is not a full answer, just a start towards a solution. The culprit is Dispatch, which became atomic in version 10, and comparison wasn't implemented for it. Here's a small test in version 9: In[1]:= a = Dispatch[{"a" -> 1, "b" -> 2, "c" -> 3, "d" -> 4, "e" -> 5, "f" -> 6, "g" -> 7, "h" -> 8, "i" -> 9, "j" -> 10, ...


5

As far as I know, there is no easy, general way to handle this kind of algebra with Sum expressions. What follows is an attempt to use replacement rules to handle a wider range of cases than chris's example. I don't consider it to be the canonical answer that is required, but perhaps someone might be able to use it as a starting point. I use Inactive on ...


5

Why do you think the result is obviously wrong? expr1 = (a + b t) Cos[n t]; int1 = Integrate[expr1, {t, t1, t2}] (1/(n^2))(-b Cos[n t1] + b Cos[n t2] + n (-(a + b t1) Sin[n t1] + (a + b t2) Sin[n t2])) The indefinite integral is int2 = Integrate[expr1, t] // Simplify (b Cos[n t] + n (a + b t) Sin[n t])/n^2 Calculating the definite ...


4

Yes we can ! MapAt[Integrate[#, {x, -Infinity, Infinity}] &, f[x], 1] // PowerExpand (* n *) tt = f[x]^2 /. Power[Sum[a__, b__], 2] :> sum[a (a /. i -> j) // Release, b, b /. {i -> j}] MapAt[Integrate[#, {x, -Infinity, Infinity}] &, tt, 1] /. sum -> Sum // PowerExpand


4

As @Szabolcs points out Dispatch does not interact well with SameQ, etc in Mathematica 10. Dispatch[1 -> 2] === Dispatch[1 -> 2] False Dispatch[1 -> 2] == Dispatch[1 -> 2] False Use Normal to "expand" the dispatch objects and then the comparison should work. Normal[Dispatch[1 -> 2]] == Normal[Dispatch[1 -> 2]] True ...


3

Another possible workaround is to wrap Dispatch with a memoized function, so that both expressions a and b contain references to the same internal dispatch table. i.e. define mem : disp[x_] := mem = Dispatch[x] then use disp in place of Dispatch in your code.


3

The approach that kguler suggest in your precedent question is completely suitable for the current one: FindSequenceFunction[Table[With[{ d1 = HypoexponentialDistribution[Flatten[Table[{λ, μ}, {i - 1}]]], d2 = HypoexponentialDistribution[{λ, μ}], d3 = ExponentialDistribution[μ], d = ExponentialDistribution[λ]}, ...


2

First note that since the $p(z)$ and the $p(x_i|z)$ are all Gaussians, the expression can be rewritten as $$I=\int \prod_{i=1}^n p(x_i | z) p(z) dz=A\int\prod_{i=1}^{2n}\exp\left(-c_i^2(z-z_i)^2\right)=A\int\exp\left(-\sum_{i=1}^{2n}c_i^2(z-z_i)^2\right)\\=A\exp(-d)\int\exp\left(-c_0^2(z-z_0)^2\right)\\=\frac{A\sqrt{\pi}\exp(-d)}{c_0}$$ where the ...


2

We can manual expand the symbolic sum with the function linearExpand given in my answer to How to do algebra on unsolved integrals?. Clear[linearExpand]; linearExpand[e_, x_, head_] := e //. {op : head[arg_Plus, __] :> Distribute[op], head[arg1_Times, rest__] :> With[{dependencies = Internal`DependsOnQ[#, x] & /@ List @@ arg1}, ...


2

Not paticularly elegant for reading but with minimal programming effort we can write f[0] = a; f[1] = b; f[k_] := HoldForm[f[k - 1] + f[k - 2]] ff[n_] := NestList[ReleaseHold, f[n], n - 1] Example ff[7] // Column $\begin{array}{l} f[7-1]+f[7-2] \\ (f[5-1]+f[5-2])+(f[6-1]+f[6-2]) \\ (f[3-1]+f[3-2])+2 (f[4-1]+f[4-2])+(f[5-1]+f[5-2]) \\ b+3 ...


1

There is a hint in the error message that the limit cannot be computed. When you have symbolic coefficients, it is possible, even likely, that the existence of the limit depends on them. If we specify the coefficient of t'[e] is positive, we get a result: Assuming[Pr (1 - Exp[-K η])/η > 0, DSolve[t''[e] + Pr (1 - Exp[-K η])/η t'[e] == 0 && ...


1

If you denote x-independent constant factor as a = Pr (1 - Exp[-K \[Eta]])/\[Eta] then FullSimplify[DSolve[{t''[x] + a t'[x] == 0, t[0] == 1}, t[x], x]] {{t[x] -> (a + C[1] - E^(-a x) C[1])/a}} and t[Infinity] == 0 is satisfied if a>0 and C[1] = -a so answer is E^(-a x) You can solve these quickly by setting the limit: ...


1

Will this do? A = Table[a[i,j],{i,3},{j,3}]; Then you can have p[x_, y_] := Sum[Sum[A[[i, j]]*x^i*x^j, {j, 1, 3}], {i, 1, 3}]; and you will have e.g.: Dimensions[A] {3,3} This is essentially what bill s proposes, but I am wrapping the symbolic a[i,j] in a matrix A.


1

Here is one way to keep everything symbolic: p[x_, y_] := Total@Flatten@Table[a[i, j] x^i y^j, {j, 1, 3}, {i, 1, 3}] p[3, 4] 12 a[1, 1] + 48 a[1, 2] + 192 a[1, 3] + 36 a[2, 1] + 144 a[2, 2] + 576 a[2, 3] + 108 a[3, 1] + 432 a[3, 2] + 1728 a[3, 3] Of course, you can assign values to the a[i,j] in order to get numerical values for the polynomial.


1

Here is my interpretation: Clear[split, exp]; split[expr_, v_] := Times @@@ GatherBy[Power @@@ FactorList[expr], ! FreeQ[#, v] &]; exp[expr_, var_] := First[#] AngleBracket[Last[#], var] &@ split[#, var] & /@ List @@ Expand[expr] // Total exp[f*f, x] (* 〈a[x]^2, x〉 + 2 c1 〈a[x] b[x], x〉 + c1^2 〈b[x]^2, x〉 + 2 c2 〈a[x] c[x], x〉 + 2 c1 c2 ...


1

Setting integrand= E^(-2 L 100) (1 - L/(2 0.08))^(-1 + 4 100 3*^-7) (L/0.08)^(-1 + 4 100 3*^-7) with the example given in your question, you can use ni[x_]:=NIntegrate[integrand,{L,0.1,x}] and Plot[Re@ni[x],{x,0.1,0.5}] to plot the numerical integrand. Your example does not seem to lend itself well to approximation, though. Or perhabs I chose the L ...



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