Wikipedia:Reference desk/Archives/Mathematics/2017 December 14

= December 14 =

Notation for applying function to series
After seeing the previous entry I wondered if there was a generalised notation similar to the sigma and pi notation for sum and product for applying a general function to each element in a sequence in turn? Would this differ if the operation /function is not commutative (for example raising each element to the power of the next)? I know that this could be done with lambda expressions if the sequence is written in full, but this is not like the simplicity of the sigma and pi notations. (Caveat, my maths is not much past high-school level except from some computer-related topics, apologies if this is a silly question). -- Q Chris (talk) 09:51, 14 December 2017 (UTC)
 * The standard mathematical notation does not generalize the sigma and pi notations. The J programming language uses + for addition and * for multiplication and +/ for sigma and */ for pi and f/ for the generalization to any function f.

2+3+4 9  +/ 2 3 4 9   2*3*4 24   */ 2 3 4 24   2-(3-4) 3   -/ 2 3 4 3
 * Bo Jacoby (talk) 10:46, 14 December 2017 (UTC).


 * It's interesting that it treats operations as right-associative, I would have assumend

(2-3)-4 -5
 * -- Q Chris (talk) 11:35, 14 December 2017 (UTC)


 * J inherited its right-associativity from APL. -- ToE 17:39, 14 December 2017 (UTC)


 * The usual thing for repeated operations in math, sum and product being exceptions, is to use a big version of whatever the operator is. For example $$\bigcap_\alpha S_\alpha$$ for intersections, $$\bigcup_\alpha S_\alpha$$ for unions. Without some sort of convention on the order of operations, the resulting expressions are ambiguous unless you assume the operator is associative, and the operands would have to be ordered in some way unless the operation is commutative. I don't think there is standard notation for repeated exponentiation unless you count tetration. --RDBury (talk) 13:10, 14 December 2017 (UTC)


 * $$ \sum_{n=1}^\infty \frac{(-1)^{n-1}}{n}$$ can have any value you like if you reorder the sum.. Dmcq (talk) 22:57, 15 December 2017 (UTC)

Drawing ellipse, from angled cylinder
I need to cut an elliptical hole into a (very thin) flat piece of metal, so that a cylinder (a pipe) tilted at some angle (relative to the flat piece of metal) will insert into it perfectly. How do I calculate, and more importantly, draw, that ellipse? Ariel. (talk) 15:26, 14 December 2017 (UTC)
 * It is clear that the minor axis of the ellipse will have the same length as the diameter of the cylinder. The major axis length is found to be $$D \sec(\theta)$$ where D is the cylinder diameter, $$\theta$$ is the angle your plane makes from the base of your cylinder (equivalently, 90 degrees minus the angle with the side of the cylinder), and $$\sec$$ denotes the secant function. Geometric constructions of an ellipse can be found at the article on the ellipse.--Jasper Deng (talk) 18:28, 14 December 2017 (UTC)
 * Thank you! Ariel. (talk) 20:38, 14 December 2017 (UTC)
 * ... or, if you have a spare piece of pipe of the correct size, then you could cut the spare pipe at the appropriate angle and then use the cut end of the pipe as template to mark the required ellipse on the metal. Gandalf61 (talk) 10:48, 15 December 2017 (UTC)
 * Don't you dare bring simple, practical solutions to a nice math problem! --Stephan Schulz (talk) 12:50, 15 December 2017 (UTC)
 * I was assuming that option was out of the question if he wanted the pipe to pass through uncut.--Jasper Deng (talk) 19:34, 15 December 2017 (UTC)
 * This method from a couple of bow thruster installation articles shows another simple, practical, non-mathematical solution which extends to a cylinder intersecting a possibly non-planar surface.  For the illustrated application, the rod passes through a pilot hole in either side of the hull, but it could be adapted for a single surface via a jig which maintains the rod's desired angle to the surface. -- ToE 02:20, 16 December 2017 (UTC)