# Tag Info

## Hot answers tagged calculus-and-analysis

12

s = {w, x, y, z}; sum = {-1, 3, 5, 8}; add = Plus @@@ Subsets[s, {3}] (* {w + x + y, w + x + z, w + y + z, x + y + z} *) Solve[add == sum, s] (* {{w -> -3, x -> 0, y -> 2, z -> 6}} *)

11

The region within the three curves can be plotted and its area determined using Mathematica's geometric capabilities. RegionPlot[y < 3/x && y < 12 x && y > x/12, {x, 0, 6}, {y, 0, 6}, PlotPoints -> 200, FrameLabel -> {x, y}] and integrate its area by Area[ImplicitRegion[y < 3/x && y < 12 x && y ...

10

mat = ConstantArray[1, {4, 4}] - IdentityMatrix[4]; LinearSolve[mat, {-1, 3, 5, 8}] {6, 2, 0, -3}

10

Here is one way: noIn[y_, x_] = y; noIn[Indeterminate, x_] = Round[x]; transIn[x_] = noIn[(1 + Erf[2 ArcTanh[2 x - 1]])/2, x]; transOut[x_] = noIn[(1 - Erf[2 ArcTanh[2 x - 1]])/2, x]; SeedRandom[15] f[x_, y_] = RandomReal[{-1, 1}, 4].Sin[RandomReal[{-2, 2}, {4, 4}].{1, x, y, x^(4/3)}]/3; r[t_] = {1/2 + Sin[t] + t^(3/2) - (t/2)^2, Sin[t] - t^2 + (2 t/3)^5 - ...

9

Perhaps this? ip[f_, g_, v_] := Module[{x, y, int}, int = (((f /. v -> x) - (f /. v -> y)) ((g /. v -> x) - (g /. v -> y)))/(x - y)^2; Integrate[int, {x, -1, 1}, {y, -1, 1}] ]; Orthogonalize[x^Range[4], ip[##, x] &] (* {x/2, 1/2 Sqrt[3/2] x^2, 3/2 Sqrt[5/13] (-((2 x)/3) + x^3), 15/8 Sqrt[21/31] (-((14 x^2)/15) + x^4)} *) The ...

7

Rules. Lots of rules. See the implementation notes in the documentation. I don't know of a way to show Mathematica's intermediate steps, but you can load the Rubi symbolic integration package, which will in fact show how it does an integral with ShowSteps=True;. Also it seems to work better than Mathematica's integrator. Int[Sin[x]^2/(x^2 + 1), x] Rule ...

7

I do not know how you get the answer you post $2 \frac{\mu^2}{\mu^2+4 k^2}$, but if you tell Mathematica that both $\mu,\theta$ are either positive or negative at the same time, you get a similar answer but one that has a $\log$ in it: Clear[x, mu,k] integrand = Sin[x]/(1 + (4 k^2)/mu^2 (Sin[x/2])^2); Assuming[ Element[{mu, k}, Reals] && {mu, k} ...

6

I think because of your parameters it's having a hard time inferring convergence / continuity conditions. For instance, the integral diverges when $\eta < 0$. You can specify assumptions and get the result: Integrate[E^(-η(x - q) - E^(-η(x - q))), {x, t, ∞}, Assumptions -> η > 0] (1 - E^-E^((q - t)η))/η Side note, Mathematica has no problem ...

5

The original problem is an interesting example where a direct usage of Solve and NSolve fails. However Reduce can succeed solving it if we set unknowns in an appropriate order, thus there is no need to play with numerical functionality if symbolic one can resolve the given system. We can observe that there is a solution under the given condition with a == ...

5

I seem to be getting different results depending on whether I use OP's suggested inner product in the comments, or if I use the polarization identity. Before everything else, however, here is a routine by Velvel Kahan for evaluating the divided difference of a polynomial, based on Horner's method: polynomialDividedDifference[poly_, {x_, a_, b_}] /; ...

5

Direct Integration Possible issues in performing the integrations include choice of Assumptions, branch cuts in the integrands, and how limits are taken. Addressing the first of these gives five solutions. il[f_, s_, t_] := Module[{r}, 1/(2 π I) Integrate[f Exp[s t], {s, r - I ∞, r + I ∞}, Assumptions -> r > 2 && t > 0]] ...

5

Confirmed for 10.4.1 as Alexei. However, WolframAlpha still gives the c/s result. See result from Wolfram|Alpha And using the properties of Dirac delta function, I would say that c/s is the correct one. May be a bug of the new 10.4.1? You can test with numeric constants, and Mathematica gives the correct answer. But symbolic result is wrong, ...

5

This integral has not a value in Riemann's sense, then it has not a value independent of your particular problem, as many people already commented above. Hence, it is better to use the residue theorem, and decide whether you want to include the residue from the pole at +b, at -b, both ou none. Therefore: rplus = Residue[E^(I a x)/(x^2 - b^2), {x, b}] ...

5

Sometimes they're equal: Block[{a = 2, b = 4}, {NIntegrate[E^(I a x)/(x^2 - b^2), {x, -Infinity, -b - I, b + I, Infinity}], -((π (I Abs[b] Cos[a b] + b Sin[a b]))/b^2) // N} ] (* {-0.77704 + 0.114275 I, -0.77704 + 0.114275 I} *) Kidding aside, perhaps you should specify PrincipalValue -> True (which I just noticed, belatedly, than Daniel ...

4

When you use Mathematica, you could start with a plot like this Plot[{3/x, 12 x, x/12}, {x, 0, 10}, PlotRange -> {{0, 10}, {0, 10}}] Then you can see where the area is which you should integrate. And by using Solve[3/x == 12 x, x], Solve[12 x == x/12, x] and Solve[x/12 == 3/x, x] you can calculate the three intersections which are 0, 0.5 and 6. ...

4

In Mathematica notation $Assumptions = ϕ ∈ Reals F[ϕ_, m_] := Integrate[1/Sqrt[1 - m Sin[θ]^2], {θ, 0, ϕ}] Plot[F[ϕ, -1], {ϕ, - Pi, π}, PlotStyle -> Red] In Maple notation F[\[Phi]_, k_] := Integrate[1/Sqrt[1 - k^2 Sin[\[Theta]]^2], {\[Theta], 0, \[Phi]}] Plot[F[\[Phi], I], {\[Phi], -2 Pi, 2 \[Pi]}] In maple 4 First of all there is somewhere in Mma a package for numerical calculation of derivatives, but I did not manage to find a reference. To offer a way to calculate the derivative. You could use the interpolation function. Here is your list: lst = {{0, 1}, {5/999, 0.999925}, {5/333, 0.9997}, {25/999, 0.999325}, {35/999, 0.998801}, {5/111, 0.998127}, ... 4 MapAt[D[#, x] &, Piecewise[{{x^2, 0 <= x <= 1}, {x, x <= 4}}], {{1, ;; , 1}}] Note: this function works for expressions with Head Piecewise. For general expressions that contain Piecewise subexpressions, it can be used with ReplaceAll as follows: Y[x_] = Piecewise[{{x^2, 0 <= x <= 1}, {x, x <= 4}}]*F + Piecewise[{{x^4, 0 <= ... 3 Analysis of the error (bug?) We can see from the trace below that the second limit, which carries out a ratio test for the product, mistakenly yields -17 (which would indicate divergence, if correct). Trace[ NProduct[(n^2)!/stirling[n^2], {n, 1, Infinity}], _Limit, TraceInternal -> True, TraceForward -> True] There might have been some ... 3 You can define a custom transformation function: sepint[expr_] := expr /. Integrate[Plus[a_, b_], c_] :> Plus[Integrate[a, c], Integrate[b, c]] Then apply it to the expression. The ComplexityFunction can be used to eliminate the DiracDelta in the expression. Simplify[Integrate[ Integrate[K[x, z] u[z], {z, -Infinity, +Infinity}] K[x, y] + ... 3 The problem is that you are not using large enough precision goal for an oscillatory integrand with very small absolute values over the integration range. Look at the log plot -- there are more oscillations than the ones visible with Plot: The remedy is to use higher precision goal. Try this: NIntegrate[ Re[(x^4 Sin[x b])/(9 + 4 d^2 x^2)^6 1/ 2 ... 3 Let, $$f=\frac{z-e^{i \pi/2 n}}{z^{2 n}+1}$$ Then, in Mathematica code, the following seems to work, Limit[f, z -> Exp[(I Pi)/(2 n)], Assumptions -> n >= 1/2] which gives the result, $$-\frac{e^{i \pi/2 n}}{2n}$$ The problem isn't that Mathematica is handling the$0/0\$ limit incorrectly. It's that Mathematica, without additional information, ...

3

This is your definition: m = 1; u[x_, t_] = (t^\[Alpha]*x*(2*t^2 + (1 + \[Alpha])*(2 + \[Alpha])))/ Gamma[3 + \[Alpha]]; Your code makes 3.19 seconds on Mma10.4.1 DUt = FullSimplify[(1/Gamma[m - \[Alpha]])*Integrate[(t - \[Tau])^(m - \[Alpha] - 1)*D[u[x, \[Tau]], {\[Tau], m}], {\[Tau], 0, t}], Assumptions -> {m - 1 < \[Alpha] < m, t ...

2

Is this what you mean? Solve[Integrate[1/x, {x, v0, vt}, Assumptions -> 0 < v0 <= vt] == g/v0, v0] (* Out: {{v0 -> -(g/ProductLog[-(g/vt)])}} *) Or perhaps with a few more assumptions, and heeding Solve's suggestion to use Reduce, which would get us a more complete complete answer including "special cases" (i.e. solutions that are valid only ...

2

In version 10.2 or later you can use the EXPERIMENTAL function FindFormula lst = {{0, 1}, {5/999, 0.999925}, {5/333, 0.9997}, {25/999, 0.999325}, {35/999, 0.998801}, {5/111, 0.998127}, {55/999, 0.997305}, {65/999, 0.996335}, {25/333, 0.995217}, {85/999, 0.993952}, {95/999, 0.992542}, {35/333, 0.990986}, {115/999, 0.989287}, {125/999, ...

2

It should be mentioned at this juncture that ExtremeValueDistribution[] is built-in; up to a normalizing factor, your distribution is equivalent to ExtremeValueDistribution[q, 1/η]. Thus, PDF[ExtremeValueDistribution[q, 1/η], x] // Simplify E^(-E^((q - x) η) + (q - x) η) η SurvivalFunction[ExtremeValueDistribution[q, 1/η], t] // Simplify 1 - E^-E^((q ...

2

I have accepted Jens' method, since it works and with a minimum of inconvenience. However, it is more useful when generalized to multiple derivatives, so I will show what I did to accomplish that below. I also want to present two other work-arounds that I came up with. I do not like either as well as Jens', but they may be useful in cases where one does not ...

2

Braces [], brackets {}, and parenthesis () all have different meanings in mathematica. Sorry for the post. I will read the documentation and tutorials more completely.

2

One could also feed the ODE into DifferentialRoot[] (along with arbitrary initial conditions) and then apply FunctionExpand[]. sol = FunctionExpand[DifferentialRoot[Function[{y, x}, {y''[x] + 2 y'[x] + 5 y[x] == x Cos[x], y[0] == C[1], y'[0] == C[2]}]][x]]; ...

2

If you just want to make a plot of the region in question, this is good RevolutionPlot3D[{{x, (x + 8)^4}, {x, 8 x + 64}}, {x, -8, -6}, {th, 0, 2 π}, Mesh -> None, Axes -> False, Boxed -> False, BoxRatios -> {1, 1, .3}] But try as I might, I can't seem to find a way to get the volume of the region using Volume - this would involve ...

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