# Tag Info

16

After a lengthy study (I'm using version 8) I conclude that there is a bug in Mathematica in the Integrate function when applied to a Sqrt integrand. Ok. let's go (some patience is required because of the long text) Let us define the functions corresponding to your integrals. Remark: because of the relation $1 + cos(2x) = 2 cos^2(x)$ the two forms of ...

12

In this second answer I give the cause for the mismatch in the integrals, show how to remove it, and make a suggestion to improve the function Integrate[]. Simplified restatement of the problem In order to focus on the core of the problem we consider the simpler integral $\int_0^1 \sqrt{\cos (2 π k r)+1} \, dr$. It has the square root and the cosine ...

10

Here is the derivation promised earlier. I have chosen to create a new answer in order not to mix things up and because it shows some handling which I like to call "man-machine" interaction with Mathematica. And, sorry for the "Greeks", but I find it very cumbersome to reedit them :-( $Version "8.0 for Microsoft Windows (64-bit) (October 7, 2011)" ... 9 In Mathematica 10, this computation may be made as follows: Clear @ r volSphere9[r_] = RegionMeasure[Ball[ConstantArray[0, 10], r]] (π^5 r^10)/120 volSphere9[1000.] 2.55016*10^30 8 Update The updated question clarifies the problem. As far as I can tell, this is a bug, a rather strange bug. I've tracked the problem down to the definition L = 1 still existing on the parallel kernels. This removes the problem: Put ParallelEvaluate@ClearAll["GlobalL"] after the second ClearAll["Global*"] halfway through the code. Then ... 8 From Weierstrass Approximation Theorem we know there is such a polynomial, moreover there are infinitely many polynomials satisfying given criterion. Therefore we would like to find those ones of the minimal order. Since we are supposed to exploit series approximations we define a polynomial of n - th order approximating 6 ArcTan[x] for x such that ... 7 The sum of the squares should be less than or equal to r^2 rather than r. d = 10; r = 1000; F = Piecewise[{{1, Sum[x[i]^2, {i, d}] <= r^2}}, 0]; NIntegrate[F, {x[1], -1000, 1000}, {x[2], -1000, 1000}, {x[3], -1000, 1000}, {x[4], -1000, 1000}, {x[5], -1000, 1000}, {x[6], -1000, 1000}, {x[7], -1000, 1000}, {x[8], -1000, 1000}, {x[9], -1000, 1000}, ... 6 It is not quite clear, what do you you want to get out of the answer. Would you like to compare Maple and Mma and understand, which one is better ? Or would you like to understand the alternative forms of taking this integral? Or the reason, why the results of Marple and Mma are different? Or transform the Mma result in terms of xand y? Or, ... 6 Taylor polynomials of order n aren't necessarily the nth degree polynomials that optimally approximate a function on a given interval. We can use linear least squares to find the optimal polynomials for a fixed n. inn[f_, g_, x_] := Integrate[f g, {x, -1/Sqrt[3], 1/Sqrt[3]}] LeastSquarePolynomial[f_, x_, n_] := With[{pows = x^Range[0, n]}, pows . ... 5 We can find a 7th order polynomial that meets the requirement if we minimise the$\infty$-norm. For simplicity I construct an array of {x, 6 ArcTan[x]} over the required range and plug it into FindFit, no doubt there are better ways. {a, b} = {-1, 1}/Sqrt[3]; data = Table[{x, 6 ArcTan[x]}, {x, a, b, (b - a)/1000.}]; n = 7; expr = Sum[c[i] x^i, {i, 1, n, ... 4 Here is another way to get points equally spaced by chord-length. It will give a good result if the chord length is relatively small compared to the maximum radius of curvature along the curve. (If, say, the chord length is no greater than the maximum radius, then between successive points, the turning will be less 60 deg., and the difference between the ... 4 The exact analytic soultion 1. Introduction The problem was still intriguing me with the result of a further study which I present in the following, for clarity as another solution. I have chosen to write the formulas in the more theoretical text in traditonal form. Abstract We calculate here the explcit analytic solution for the integral$f(k,R)=\int ...

4

ImplicitRegion (and ParametricRegion) represent a region. They are not for plotting. Thus RegionPlot is not even remotely an alternative. You can do many operations on regions that you can look up in the documentation centre. Just a few examples: you can compute their size, decide if a point is within, compute the distance between them, find their ...

4

Mathematica 10 provides new functionality dealing with curves, (see e.g. the Vector Analysis tutorial) like ArcLength, ArcCurvature and especially FrenetSerretSystem: FrenetSerretSystem[{ x1, ..., xn}, t] gives the generalized curvatures and Frenet-Serret basis for the parametric curve x[t] i.e. it returns {{ k1, ..., k(n-1)}, { e1, ..., en}}, where ki ...

4

To compute $\nabla^nr$ for arbitrary integer $n$, you can use the built-in tensor derivative syntax. For example, you can compute the second-derivative $\nabla^2r$ using r = Sqrt[x^2 + y^2 + (z - a)^2]; X = {x, y, z}; D[r, {X, 2}] To get an answer in terms of $r$, you can sort of cheat your way to the correct answer via the following modification: r = ...

4

These singularities in $g(\cdot,y)$ are all removable. There are eight singular values of y, depending only on a, and you can take the limit as $y\rightarrow s$ for each singular value $s$ and obtain limit for all but finitely many values of $x$. Those are also removable by taking a limit. The function is still continuous, smooth, bounded, etc. The values ...

4

I said in a comment that one could "factor" out ((-1 + a y^2 (1 + y)^2)^2 from the numerator. What I meant was that numerator is $O(((-1 + a y^2 (1 + y)^2)^2)$. The integral is a complicated expression, so the easiest way to examine it, it seemed to me, is to look at the coefficients of the power series expansion about the real roots of the denominator. ...

4

Partial sums of this sequence are given by: Sum[(-1)^(n + 1) Cos[3^n x]^3/3^n, {n, 1, m}] (* output: 1/4 Cos[3 x] - 1/4 (-(1/3))^m Cos[3^(1 + m) x] *) For real $x$, we know this converges because $\cos(3^{1+m}x)$ is bounded. Mathematica does not assume $x$ is real and, as Bob Hanlon notes, will produce the correct result by evaluating a partial sum, ...

4

In Version 10 you can now create ImplicitRegions and Integrate over them: region = ImplicitRegion[And @@ {0 <= x, x <= 1 - y, -1 <= y, x + 2 y <= 2}, {x, y}] Now Integrate[x + y, {x, y} ∈ region] 2/3

4

There exist few typos in your kernel definition. This is how your kernel looks assuming a=2 (we denote it as A while defining the kernel as Kpart in the following). Please utilize the code from here to solve your problem. Below I changed the constants and functional arguments of FredholmKind2 to fit your particular problem. n = 20;(*number of ...

3

Your equation has a sign error for the inverse Fourier transform. A simpler prescription is I InverseFourierTransform[FourierTransform[f[t], t, w]/w, w, x] Although there is a lrge range of function for which this works, it will of course fail for all those functions for which the Fourier transform can't be calculated. Anyway, it does work for ...

3

My version of Mathematica has no problems calculating analytically the integral $\int_{x-b}^{b+x} 2 r (l-r) \cos ^{-1}\left(\frac{s^2+x^2-b^2}{2 s x}\right) \, dr$ The result looks nice (IMHO) rather than "ugly". \$\frac{1}{9} b^3 \left(9 L \pi -2 (2+z) (8+z (2+z)) \text{EllipticE}\left[\frac{4 (1+z)}{(2+z)^2}\right]+2 z (2+z)^2 ...

2

A fix For s, you could use s = x \[Function] Piecewise[{{Cos[x], -Pi/2 <= Mod[x, 2 π, -π] <= Pi/2}}]; Integrate[s[t], {t, -8, 6}] (* 5 + Sin[6] *) The problem The problem with the original ff and s is that the function calls itself. Now consider ff[t] or s[t]. None of the conditions will evaluate to False so "the Piecewise function is returned ...

2

In mathematics, a set can be write in two(or more) form: one is {3x | x in [0,1]}, the other {x | P(x)}, where P is called a propositional function or predicate. Since Mathematica have a great power of dealing with quantifiers, once you can write a set in the second form above, you can do plenty of things and tricks that you would have thought to have ...

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

2

Assuming by ln you mean the natural logarithm, in Mathematica this is entered as Log Integrate[t^z Log[t], {t, x, y}, Assumptions -> {z ∈ Integers, 0 < x < y}]

1

As I said in a comment I object to the downvaluing of my solution by somebody anonymus without giving the reasong for it. Now you can convince yourself here that my solution of the real problem is correct. And, consequently, that the second integral of "identy" (and sequel) is not. Here we go: I gather from your first lines that you wanted to calculate ...

1

No apparent complication in v10 under Windows: Integrate[Sqrt[w/2 (w/2 + u + v)], w] (Sqrt[w] Sqrt[2 u + 2 v + w] (Sqrt[w] (u + v + w) Sqrt[2 u + 2 v + w] - 2 ((u + v)^2) Log[Sqrt[w] + Sqrt[2 u + 2 v + w]]))/(4 Sqrt[w (2 u + 2 v + w)])

1

You could define your function as f[x_] := 2 Mod[x, 1] then Integrate[f[x], {x, 0, 5}] yields 5 (as expect 5 triangles of area 1) To plot: Plot[f[x], {x, -4, 4}, Exclusions -> None]

1

I assume that |...| means Abs[...]. Define the symbolic integral. int[r0_?NumericQ, k_?NumericQ] := Integrate[Sqrt[r] Abs[Cos[(k + 1/2) \[Pi] r]], {r, r0, 1}] Define the numerical integral. intN[r0_?NumericQ, k_?NumericQ] := NIntegrate[Sqrt[r] Abs[Cos[(k + 1/2) \[Pi] r]], {r, r0, 1}] Compare these integrals for your chosen parameter values, using 1/2 ...

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