# Tag Info

## New answers tagged calculus-and-analysis

0

This doesn't use the Peano-Baker series, but you can calculate the state transition matrix using NDSolve. The state transition matrix has the following properties: $\Phi(t_0,t_0) = I$, (where $I$ is the identity matrix) $\frac{d}{dt} \Phi(t,t_0) = A(t) \Phi(t,t_0)$ For a time-varying matrix $A(t)$ of size $n \times n$, and a mathematica function fA[t] ...

2

The method used in Jason's answer, as noted, requires version 12. For those in earlier versions who are unable or unwilling to install cheminformatics toolboxes like RDKit, ChEMBL Beaker (see also the associated paper) provides an API that can be used to compute the ring counts required by the underlying formula, which is used in the code that follows: ...

1

If HeavisideTheta = 1, is HeavisideTheta in v11.3 equal to UnitStep in v5.0? For calculus purposes, sure. Can I replace UnitStep with HeavisideTheta? HeavisideTheta[] is what you should be using in version 6 and later versions, because it's the one now supported extensively by the calculus functions. In earlier functions, you have to settle for ...

9

The paper Fast Calculation of van der Waals Volume as a Sum of Atomic and Bond Contributions and Its Application to Drug Compounds, pointed out by theorist gives an approximate formula for the molecular volume as $$V_{\mathrm{vdW}} = \sum \mathrm{all\: atom\: contributions} - 5.92 N_\mathrm{B} - 14.7 R_\mathrm{A} - 3.8 R_\mathrm{NA}$$ where $N_\mathrm{B}$...

3

You can use ConditionalExpression as in this answer linked by m_goldberg in comments: Manipulate[ Plot[{f[x], ConditionalExpression[tangent[f, p, x], p - .5 <= x <= p + .5]}, {x, -2 Pi, 2 Pi}, Epilog -> {Red, PointSize[.015], Point@{p, Sin[p]}}], {p, -Pi, Pi}] You can replace ConditionalExpression[...] with Piecewise[{{tangent[f, p, x], ...

3

This is a kludge onto your code. I would have written the whole thing rather differently. Manipulate[ Plot[ {f[x], If[Abs[p - x] < 1, 100 tangent[f, p, x], 0]}, {x, -2 Pi, 2 Pi}, Epilog -> {Red, PointSize[.015], Point@{p, Sin[p]}}], {p, -Pi, Pi}]

5

Look at FunctionRange Clear["Global*"] f[a_, b_, c_] := a^b + c FunctionRange[ {f[a, b, c], 1 <= a <= 10, 0 <= b <= 3, 0 <= c <= 100}, {a, b, c}, y] EDIT: Alternatively, use MinValue and MaxValue f[a_, b_, c_, d_] = ((a*b)/1000)*c + d; cond = {-99 <= a <= 99, 0 <= b <= 1000, -500 <= c <= 500, 0 <= d <= 50}; ...

4

The simple answer is a^0 == 1 for all a /; a != 0. Look at a plot: Plot3D[Evaluate@ReIm[a^(1/n)], {a, -2, 0.25}, {n, 1, 10000}, AxesLabel -> Automatic, ScalingFunctions -> {None, "Log", None}, ClippingStyle -> None, PlotLegends -> {Re, Im}, PlotPoints -> 100] For a < 0 as n increases, the real part goes to 1 and the imaginary part ...

0

The solution starting from the indefinite integral seem to match: indef = 1/(I Pi) FullSimplify[ Integrate[(1 - Exp[I (ArcCos[2 - Cos[a]])] Cos[a])/Sin[ArcCos[2 - Cos[a]]], a], Assumptions -> {0 <= a <= Pi}]; Limit[indef, a -> Pi] - Limit[indef, a -> 0] (* -(2/\[Pi]) *)

10

I can offer a solution by discretization to ElementMesh with external meshing software Gmsh. Currently it produces better quality mesh on curved surfaces that built-in methods. We need packages GmshLink, ImportMesh and MeshTools. Needs["GmshLink"] (*Set your path to Gmsh executable.*) $GmshDirectory = "my_path_to_current_release\\gmsh-4.4.1-Windows64"; OP'... 1 It does not work , because MMA dosen't know a closed-form solution for the Sum. Workaround: Only for: -1 < x < 1, -1 < y < 1 func = Sum[MellinTransform[(-1)^n*y^n*x^(a n^2), a, s] // PowerExpand , {n, 0, \[Infinity]}, Assumptions -> {-1 < x < 1, -1 < y < 1, s > 0}] sol = Simplify[Series[func, {x, 0, 8}, {y, 0, 8}] // Normal] ... 4 Mathematica works very carefully and correct in this case. One additionally needs to say that the function is real. Integrate[DiracDelta[f[x]], {x, -∞, ∞}, Assumptions -> f[x] ∈ Reals && f[x]!= 0] (* 0 *) 0 I managed to find an answer to my question and would like to share my experience with the community. It turns out that MA can do a lot with elliptic integrals, however, it does not know some identities, in particular Eq.8.126 from Table Of Integrals, Series And Products by Gradshteyn and Ryzhik. I retype them below in original notations $$K\!\left(\frac{2\... 2 For numerical integrations, you should use NIntegrate instead of Integrate. With NIntegrate[1/(1 + x^2 + y^2 + z^2)^2, {x, 0, 1}, {y, 0, 1}, {z, 0, 1}] you obtain the same result as in WolframAlpha: 2 Try utilizing Manipulate. Manipulate[ tbl = Flatten[ Table[{θ0, r, funct[θ0, r, β, γ]}, {θ0, 1, 10, 0.5}, {r, 1, 10, 0.5}], 1]; ListPlot3D[tbl, AxesLabel -> {θ, r, v}, PlotRange -> All], {β, -2, 2, 0.1}, {γ, -2, 2, 0.1}] 0 You can get a list of the values using Map (i.e., shortcut /@) f[#] & /@ Range[4, 1, -1] {f, f, f, f} To get the Dot product of the f's you can Apply (i.e., shortcut @@) the Dot function: Dot @@ (f[#] & /@ Range[4, 1, -1]) 6 min = Minimize[{n, 2^x == n*x, n > 0}, {n, x}] (* {E Log, {n -> E Log, x -> 1/Log}} *) min[] // N[#, 50] & (* 1.8841693853637201099021591169254013346972650564547 *) EDIT: Graphically, ContourPlot[2^x == n*x, {n, 1, 3}, {x, 0, 3}, Epilog -> {Red, AbsolutePointSize, Tooltip[Point[{n, x}], {n, x}] /. min[]}, ... 3 Not perfect, but it is a start. f = X \[Function] {2 Indexed[X, 1] + Sin[Indexed[X, 1] + Indexed[X, 2]], 2 Indexed[X, 2] + Cos[Indexed[X, 1] + Indexed[X, 2]]}; Df = X \[Function] Block[{x, y}, D[f[{x, y}], {{x, y}, 1}] /. {x -> Indexed[X, 1], y -> Indexed[X, 2]} ]; g = Y \[Function] Block[{X}, X /. FindRoot[f[X] == Y, {X, 0. Y}]]; ... 8 Many times Mathematica gives enormous results to simple problems If Simplify still does not help reduce the antiderivative to what you like, you could always try Rubi << Rubi` integrand = 1/Sqrt[1 + Sin[x]]; sol = Int[integrand, x] D[sol, x] // Simplify There is a page here which compares different integrators with the size of antiderivatives ... 12 As I said, only a synthetic approach is possible. Please, look here (sec. 0.5) for a mathematical proof of some of the transitions. We have$$ S=\int_0^1{\mathrm e^{\mathrm i\pi x}x^x(1-x)^{1-x}\mathrm dx} =\int_0^1 (1-x)\, \exp\left\{\left[\mathrm i\pi+\log x-\log(1-x)\right]x\right\}\, \mathrm dx$$First we verify numerically p[z_] := (1-z) E^((I π + ... 2 The following does not answer the OP's question but does supply the answer to a few comments asked above: Rather than just a comment that might be missed, I am posting the links I've received from the Mathematics forum. I was interested in the integral and felt asking it's solution was more appropriate there: It's a beautiful example of using the residue ... 1 I am unable to Integrate it analytically (tried Integrate[E^(I Pi x) x^x (1 - x)^(1 - x), x, Assumptions -> 0 < x < 1] without success). I had to use NIntegrate NIntegrate[E^(I Pi x) x^x (1 - x)^(1 - x), {x, 0, 1}] (* 1.73472*10^-17 + 0.355822 I *) and to get rid of the small Real portion Chop[NIntegrate[E^(I Pi x) x^x (1 - x)^(1 - x), {x, 0, 1}]... 1 The Integral has no closed form solution, so use NIntegrate instead of Integrate: \[Mu] := 1; Eb := 0.040; \[CapitalGamma] := 1;(*Fitting parameter*)Eg := 2.354 Ebj := Eg - Eb/j^2 c := 1.4 (*fitting parameter*) and A[x_?NumericQ] := \[Mu]^2/ x (Sum[(2 Eb/j^3 Sech[(x - Ebj)/\[CapitalGamma]]), {j, 1, 10}] + NIntegrate[Sech[(x - e)/\[CapitalGamma]] ... 5 I would likely write your function definition as opticalDepth[η_] := Integrate[ηe[u] σT a[u], {u, 0, η}] because a single letter variable like u is easy to type. To avoid problems with a previous top-level assignment to u, you can write it with a guard: opticalDepth[η_] := Block[{u},Integrate[ηe[u] σT a[u], {u, 0, η}]] However, using a formal symbol ... 0 Try ParametricPlot3D: myf[z_] := (2 + z) Log[2 + z] - 2 (1 + z) Log[1 + z] + z Log[z]; p1 = ParametricPlot3D[{Re[z], Im[z], Re[myf[z]]} /. z -> r Exp[I t], {r, 0, 3}, {t, -Pi, Pi}]; p2 = ParametricPlot3D[{Re[z], Im[z], Re[myf[z]] + 0.02} /.z -> r Exp[Pi I], {r, 0, 2}, PlotStyle -> {Thickness[0.005], White}]; Show[{p1, p2}] 2 ClearAll[int] int[x_?NumericQ] := NIntegrate[(5*10^(-3))/((78/10)* z + ((((5463/20) + (20))*(((138064852)/(100000000))*10^(-23))*(2))/ (((16021766208)/(10000000000))*10^(-19)))* Log[1 + ((z)/(10^(-4)))]), {z, x, Pi}] plot = Plot[int[x], {x, 0, 1} , AspectRatio -> 1, Frame -> True, Axes -> False] ParametricPlot Quiet@... 1 A little dowdy but will do for the moment. v=0.75; f[x_]:=v ArcSin[x]+Cos[ArcSin[x]]; F=InverseFunction[f]; ifun=Interpolation[Table[{f[x],x},{x,v,1,0.001}]]; inverse[y_]:=Piecewise[{{ifun[y],f<y<f[v]},{Indeterminate,True}}] Plot[{f[x],F[x],inverse[x]},{x,-1.3,1.3},AxesOrigin->{0,0}] 3 If you do the integral first and then take the limit, you get an answer, but not the one you want. int = Integrate[x/E^(30/(a^16*Log[1/x])^(1/15)), {x, 0, 1}] (* (Sqrt*MeijerG[{{}, {}}, {{0, 1/15, 2/15, 1/5, 4/15, 1/3, 2/5, 7/15, 8/15, 3/5, 2/3, 11/15, 4/5, 13/15, 14/15, 1}, {}}, 65536/a^16])/(256*Pi^7) *) In your preferred direction: ... 10 This is a precision issue.$Version (* "12.0.0 for Mac OS X x86 (64-bit) (April 7, 2019)" *) Since you used a machine precision number (i.e., 0.5) in the integrand, the integration is done with only machine precision. Integrate[E^(-16/x^8^(-1) - (2*x)/(0.5)^9)/x^(9/8), {x, 0, Infinity}] (* -0.0824979 *) Using exact numbers int = Integrate[E^(-16/x^8^(-...

7

Another case of using non-exact numbers with exact function. See the difference: integrand = x^(-9/8) Exp[-16 x^(-1/8) - 2 x/(1/2)^9]; Integrate[integrand, {x, 0, Infinity}] // N integrand = x^(-9/8) Exp[-16 x^(-1/8) - 2 x/(0.5)^9]; Integrate[integrand, {x, 0, Infinity}] Rule of thumb: use exact numbers when calling exact functions like DSolve, ...

Top 50 recent answers are included