Wikipedia:Reference desk/Archives/Mathematics/2017 November 24

= November 24 =

Intersection of Hyperplance and Hypercube
Let $$A=\{x\in\mathbb R^n|a^Tx=b\}$$ (for $$a\in\mathbb R^n, b\in\mathbb R$$) be a hyperplane, and $$B=[0,1]^n$$ be a hypercube.

Does the intersection $$A\cap B$$ equal the convex hull of two $$n-2$$-dimensional hypercubes? David Frid (talk) 12:52, 24 November 2017 (UTC)


 * Even in the case of a 3-D cube you can get a hexagon by such a cut and you can't get six outside points as thehull of two lines with four end points in total. Dmcq (talk) 16:33, 24 November 2017 (UTC)


 * Thank you David Frid (talk) 07:58, 25 November 2017 (UTC)

Maximum Distance
Let $$A$$ be the intersection of some hyperplane and hypercube. Let $$p\in\mathbb R^n$$. Let $$f(x)=\begin{cases} d(x,p) & x\in A \\ 0 & \mathrm{else} \end{cases}$$ ($$d$$ denotes the Euclidean distance).

Does $$f$$ have a local maximum, which is not a global maximum too? David Frid (talk) 13:25, 24 November 2017 (UTC)


 * You can have a local maximum which is not a global maximum. For instance just consider a plane intersecting a cube to give a square. The distance to the two far corners from a point near the middle of one side will be local maxima. On the other hand with the point close to one corner there will just be a single maximum to the opposite corner. Dmcq (talk) 16:39, 24 November 2017 (UTC)


 * (edit conflict) Let n=2. The hypercube is a square (including the interior), and the hyperplane is a line intersecting the square in the line segment AB, with endpoints A and B on the square’s boundary. Let P be a point in the plane such that its nearest point on AB is the point C = (2/3)A +(1/3)B. Then f has maxima at A and B with the global maximum at B. Loraof (talk) 16:45, 24 November 2017 (UTC)


 * Thank you!
 * What happens if we also assume that the hyperplane is $$\{x\in\mathbb R^n|a^Tx=b\}$$ for some $$a\in \mathbb \R_+^n, b\in\mathbb R_+$$, and the hypercube is $$[0,1]^n$$, and $$p=(0.5,0.5,\dots)$$ is the hypercube's center.
 * Under these extra assumptions, can we have a local maximum that is not a global maximum too? (the above examples do not apply for these extra assumptions)David Frid (talk) 07:45, 25 November 2017 (UTC)
 * Yes lots. A plane going through p will have the origin and the farthest point of the hypercube from the origin as maxima. Some other plane going through the origin but just a little away from it will have a local maximum to a point near the farthest away point of the hypercube from the origin. Dmcq (talk) 22:04, 25 November 2017 (UTC)
 * Can we upper bound the number of local-and-not-global maxima? For example, can we have more than 2n such maxima? David Frid (talk) 08:49, 28 November 2017 (UTC)

Difficulty Simplying Terms in Lagrange Polynomial
I'm teaching myself Lagrange interpolation, and I can't seem to get the correct interpolating polynomial for the study exercises. I'm sure that I'm setting up the calculation correctly, but even with just 4 data points, the resulting expression is so complicated that I'm probably making mistakes when I simplify it. The data points are (-1,0), (2,1), (3,1), and (5,2). The resulting polynomial terms are:

$$

P_3(x) = \frac{ (x+1)(x-3)(x-5) }{9} - \frac{ (x+1)(x-2)(x-5) }{8} + \frac{ (x+1)(x-2)(x-3) }{18}

$$

By combining the first and third terms, I get:

$$

\frac{-x^2 + x + 12}{6}

$$

Next, I find the LCD for that expression and the second term:

$$

\frac{-4x^2 + 4x - 48}{24} - \frac{(3x + 3)(x^2 - 7x + 10)}{24}

$$

Adding and simplifying results in the expression:

$$

P_3(x) = \frac{-x^3}{8} + \frac{7x^2}{12} + \frac{-5x}{24} - \frac{13}{4}

$$

However, the answer (from Wolfram Alpha) is:

$$

P_3(x) = \frac{x^3}{24} - \frac{x^2}{4} + \frac{11x}{24} + \frac{3}{4}

$$

Can anyone see where I'm making a mistake? OldTimeNESter (talk) 20:21, 24 November 2017 (UTC)


 * Well, you're missing an $$x^3$$ term on the first step, so that'll throw things off at least. But overall, it would probably be easiest to simplify systematically: just multiply out each term and then combine them all together at the end (by factoring out 1/72).  --Deacon Vorbis (talk) 20:40, 24 November 2017 (UTC)
 * The simplest way is to note that there is a common factor $$x+1$$ in all three terms. Ruslik_ Zero 20:57, 24 November 2017 (UTC)
 * ... so take out a common factor of at the start, then combine the quadratic terms: 8(x-3)(x-5) - 9(x-2)(x-5) + 4(......  There was nothing wrong with your original method except for the error in multiplying, but you might find it easier to start this way.   D b f i r s   21:23, 24 November 2017 (UTC)

Shoot, Deacon Vorbis, you're right: I don't know how I missed that. I usually do just multiply everything out, too, but I was trying to do it in fewer steps to avoid making mistakes (like the one I did make!). OldTimeNESter (talk) 18:33, 25 November 2017 (UTC)
 * I often make mistakes when I try to multiply out cubics (lack of practice), so combining terms with the factor outside makes errors less likely (for me at least).   D b f i r s   23:02, 25 November 2017 (UTC)

As you have 4 data points you must also have 4 terms in the Lagrange Polynomial expansion. You have forgotten one term. (The article Lagrange interpolation stupidly counts the 4 terms from 0 to 3. Count from 1 to 4). Bo Jacoby (talk) 08:19, 1 December 2017 (UTC).