Tag Info

New answers tagged

1

As stated in the OP Mathematica finds this value of the integral within seconds f0 = Integrate[x^2 Log[1 - E^-x], {x, 0, \[Infinity]}] (* Out[21]= -(\[Pi]^4/45) *) Most probably Mathematica employs this standard procedure: 1) solve the indefinte integral, i.e. find an antiderivative 2) check continuity of the antiderivative 3) use the fundamental ...


1

booleanTable := Module[ {var, iter}, f = Input["Enter Boolean function"]; var = BooleanVariables@f; iter = Sequence @@ ({#, {True, False}} & /@ var); Column[{Table[ Evaluate[{var, f} // Flatten], Evaluate[iter]] // Flatten[#, Length[var] - 1] & // Prepend[#, {var, f} // Flatten] & // ...


0

You seem to be trying to use Mathematica as if it were a procedural language such a Java. Sometimes that works, but it's almost always better to take a functional approach in Mathematica, especially when trying to work symbolically. One way to do what you ask is as follows. This approach supplies the boolean expression encapsulated in a pure (i.e., ...


7

The "trick" which works frequently when Mathematica refuses to calculate a definite integral is to calculate first the indefinite integral, then take the limits at the ends of the integration interval and subtract the results. Here we go. Let the integrand be f = -((cA Log[1 + mgl^2/sa1])/(-1 + x)) + (cA Log[-(sa1/(-mgl^2 - sa1))])/(1 - x) + (cA cF Log[-1 ...


3

seems to work: expr /. Times[xx_?(! FreeQ[#, x] &) , p_plusd, rest___] :> Times[xx /. x -> 1, p, rest] and terms like: 2 Log[(sa1 (-2 + x))/(-mgl^2 + sa1 (-2 + x))] plusd[1/(1 - x)] and Log[2 + mgl^2/sa1 - x] plusd[-(2/(-1 + x))] were reduced to 2 Log[-(sa1/(-mgl^2 - sa1))] plusd[1/(1 - x)] and Log[1 + mgl^2/sa1] plusd[-(2/(-1 + x))] ...


2

Adapting linearExpand from my answer to How to do algebra on unsolved integrals?, we can come up with some transformations to factor separable multiple integrals. The function someFunction internally deals with and returns Inactive integrals, which can be evaluated with Activate, if appropriate or desired. Examples someFunction[Integrate[p[x] p[y], {x, ...


0

You may need to use the "list" data structure in mathematica. Say, $\Sigma$ is a two by two matrix. In Mathematica, you just input Sigma = {{x+y, m+n}, {x+y-w, m-n.l}} Similarly b={u,v} Then, $b\Sigma b^T$ is just b.Sigma.Transpose[b,{1}] Hope it works for you.


0

You could do something like this: expr[i_] := Defer[dS[i] = -β[i]*S] Do[expr[i][[1]]; CellPrint@Cell[BoxData@ToBoxes@expr[i], "Output"], {i, 4}] In the Do loop I evaluate the assignment and also create a cell with the definition. You could use "Input" instead of "Output" if you prefer.


3

You could try something like the following: Table[dS[i] = -β[i]*S[i], {i, 4}]; To see the definitions for dS use the function Definition. Definition[dS] (* dS[1]=-S[1] β[1] dS[2]=-S[2] β[2] dS[3]=-S[3] β[3] dS[4]=-S[4] β[4] *) See that you can perform operations on dS. dS[1] + dS[2] (* -S[1] β[1] - S[2] β[2] *)


0

Dos this work Do[dI[i] = -beta[i]*S; Print["dI", i, "= -beta", i, "*S"], {i, 4}] Any method that can print what you want has to change the expression to a kid of String. At the end, the printed expression the way you what has to be kind of String You can try Inactivate Do[dI[i] = -beta[i]*S; Print[Inactivate[dI[i] = -beta[i]*S]], {i, 4}]


1

Not an answer but too long for comment: If I modify slightly your input and choose 'n=2` n = 2; Solve[Table[{Subscript[β, 1] (1 - Subscript[a, i] - Subscript[b, i] - Subscript[c, i]) Sum[ Subscript[A, i, j] (Subscript[a, j] + Subscript[c, j]), {j, 1, n}] - Subscript[δ, 1] Subscript[a, i] + Subscript[δ, 2] ...


0

Maybe for this case use: someFunction[int_] := (int /. _[y] :> 1/2)^2


8

This will work with any number of independent integrants. Define: repl[l_] := # /. Thread[#[[All, 1]] -> Table[x, {Length[#]}]] &[l] inTfaC[int_] := Times @@ MapThread[Integrate[#1, #2] &, repl /@ {First[#], Rest[#]} &[ int /. {Integrate -> List, Times -> List}]] Now verify: test = Integrate[p[x] p[y] q[z] r[s] r[u], {x, ...


1

Here is a simple solution. Think of everything as functions. Then define: A = Function[T , Function[{i,j,k}, u[i+1,j,k]*(T[i+1,j,k]+T[i,j,k]) - u[i-1,j,k]*(T[i-1,j,k]+T[i,j,k]) + v[i,j+1,k]*(T[i,j+1,k]+T[i,j,k]) - v[i,j-1,k]*(T[i,j-1,k]+T[i,j,k]) + ...


1

Mathematica has logical symbols such as $\exists$, $\forall$, $\in$, $\wedge$, and so forth and can be used in statements such as ForAll[{a, b}, a > 0 && b > 0, (a + b)/2 >= Sqrt[a b]]. One performs simple logical resolution by Resolve[] applied to such an expression. I suspect Mathematica can simplify or resolve such logical and ...


5

Given expression = (20*t^2*Erf[b + t])/(E^t^2*Sqrt[a + t^2]) can be achieved via replacement of the Head List @@ expression To find constant factors: GatherBy[List @@ expression, NumberQ] It is so because Times here is single Head for all first-level factors: TreeForm[expression] This also can prove to be useful: FactorList[expression] ...


4

OK, with your new formula I'm able to give an incomplete answer now. The difficulty in implementing the forumla $$-\sum _{n=1}^{\infty } \frac{B_n(1) f^{(n-1)}(0)}{n!}$$ is how to symbolically compute the n-th derivative, which is discussed here. Use the solution in that post, we can easily obtain this: ramanujanSum[f_] := Block[{x, n}, FullSimplify[ ...


4

This is a problem known as finding moments of moments. In this case, we seek the covariance (i.e. the $\mu_{1,1}$ central moment) of various sample moments. The modus operandi for solving such problems is to work with power sum notation $s_r$, namely: $$s_r = \sum_{i=1}^n X_i^r$$ In this case, you are interested in the sample mean $ = \frac{s_1}{n}$, and ...


3

I believe the reason for the confusion is the way the Dot product operates. It is a Flat but non-commutative operation when the factors aren't just vectors. In particular, it contracts the last index of the first factor with the first index of the next factor, going from left to right. But in the form $a\cdot\varepsilon\cdot b$, this means that the ...


0

I believe you seek: a.Transpose[LeviCivitaTensor[3]].b



Top 50 recent answers are included