Wikipedia:Reference desk/Archives/Mathematics/2011 November 2

= November 2 =

manipulating inequalities
Hi,

A real basics/fundamentals question - can someone give me a run down, in plain english, (i.e. not in the formal mathematical language of the Wikipedia article on Inequality (mathematics)) on the "rules" around manipulating inequality equations? Does addition/subtraction on both sides work the same way as in "=" equations; does multiplying/dividing both sides work the same etc. If an example would help and take things out of generalities, could you run me through the simplification of 1/(2*(X + 3) - 4) > 5

Thanks! --58.175.32.245 (talk) 10:54, 2 November 2011 (UTC)
 * Addition and subtraction on both sides works the same as in an equality. Multiplying or dividing each side by a positive number is the same too. Multiplying or dividing each side by a negative number means you have to swap the inequality sign.Widener (talk) 11:37, 2 November 2011 (UTC)


 * It might help you to know that inverting both sides means that you have to swap the inequality sign, as long as both sides are the same sign, as in both being positive or both negative. If they are of mixed signs, then inverting both sides allows you the keep the inequality sign.  Do you see how to apply this to your problem even though you might at first not know if X itself is positive or negative?  You can get around using this (or alternately prove it, if you wish) by using the multiplication and division rules mentioned above. -- 110.49.227.102 (talk) 12:30, 2 November 2011 (UTC)


 * Also, you may need to work by cases.
 * $$\frac{1}{2(x+3)-4}>5 \quad\Rightarrow\quad \begin{cases} 1>(2(x+3)-4)5\quad & \text{if } 2(x+3)-4>0 \\ 1<(2(x+3)-4)5 & \text{if } 2(x+3)-4<0 \end{cases}$$
 * Bobmath (talk) 12:40, 2 November 2011 (UTC)


 * And if you do have an exercise that you need to work by cases (because of a rule which is dependent on the sign of a value which you cannot determine) and one of those cases results in a contradiction ( such as x 5 ), don't despair. All that means is that the initial equation excludes the possibility of that case.  You can either simply ignore that case from there on out, or look back to your original equation to see if you can, with hindsight, see how that case is excluded. -- 110.49.227.102 (talk) 14:36, 2 November 2011 (UTC)

Length of a curve with integrals
I've been asked to show that, for a differentiable function f,
 * $$\lim_{x \to a^{+} } \frac{ \mathcal{L}(x) }{d(x)} = 1,$$

where a is a constant, $$\mathcal{L}(x) = \int_{a}^x \sqrt{1 + (f')^2}$$, d(x) is the length of the line segment joining (a, f(a)) to (x, f(x)), and f' is continuous at a. Spivak (Calculus, Ch. 13) suggests using "a couple of Mean Value Theorems", but I'm not sure how that could be used, aside from the observation
 * $$d(x) = \sqrt{(x-a)^2 + (f(x) - f(a))^2} = (x-a) \sqrt{1 + \left[ \frac{f(x) - f(a)}{x-a} \right]^2}$$

and the second term under the square root looks like one which appears in the MVT (and d(x) is then similar to the integrand in the numerator). Some suggestions on how to proceed would be great. — Anonymous Dissident  Talk 11:09, 2 November 2011 (UTC)


 * I don't think it needs the mean value theorem, at least not directly. We have:
 * $$\frac{ \mathcal{L}(x) }{d(x)} = \frac{\frac{1}{x-a}\int_{a}^x \sqrt{1 + (f')^2}\,dx}{\sqrt{1+\left[\frac{f(x)-f(a)}{x-a}\right]^2}}.$$
 * Taking the limit as $$x\to a$$ gives, by the fundamental theorem of calculus in the numerator, and the continuity of square root in the denominator,
 * $$\frac{\sqrt{1 + f'(a)^2}}{\sqrt{1+f'(a)^2}}=1.$$
 * Seem reasonable?  Sławomir Biały  (talk) 11:33, 2 November 2011 (UTC)
 * Yes, but this exercise is prior to the discussion of the fundamental theorem, so I'd prefer to find a proof that does not rely on it. — Anonymous Dissident  Talk 11:44, 2 November 2011 (UTC)
 * In that case, I would suggest studying the proof of L'Hopital's rule using the Cauchy mean value theorem.  Sławomir Biały  (talk) 11:53, 2 November 2011 (UTC)
 * Wouldn't that involve consideration of $$\mathcal{L}'(x)$$, which can't be calculated without the fundamental theorem? — Anonymous Dissident  Talk 21:30, 2 November 2011 (UTC)
 * There's the mean value theorem for integrals.  Sławomir Biały  (talk) 22:23, 2 November 2011 (UTC)

Particle
A particle moves along the graph $$y = \log x$$ with constant speed 1 and in the direction of increasing x. Find the acceleration vector of the particle at the point (1,0). Widener (talk) 11:44, 2 November 2011 (UTC)


 * Hint: Perhaps the article curvature might be helpful. Sławomir Biały  (talk) 12:08, 2 November 2011 (UTC)


 * Also the "Tangential and centripetal acceleration" section of Acceleration←86.155.185.195 (talk) 12:57, 5 November 2011 (UTC)
 * Is there an algorithm to solve this type of problem in general (i.e. replacing $$\log$$ with any arbitrary function?) Widener (talk) 04:16, 4 November 2011 (UTC)
 * Yes. According to my calculations, for a general function $$f(x)$$ the acceleration at point $$(x,f(x))$$ of a particle moving at constant speed 1 is $$\frac{f''(x)(-f'(x),1)}{(f'(x)^2+1)^2}$$. -- Meni Rosenfeld (talk) 10:41, 4 November 2011 (UTC)
 * How did you derive that? It looks like you have taken the unit vector orthogonal to the velocity vector and multiplied it by the curvature. What I don't understand is why this works. I must admit that I had not known about the concept of curvature until Sławomir showed me that article. Widener (talk) 11:17, 4 November 2011 (UTC)
 * That is to say, I do not know why $$\left|\left|\mathbf{a}(s)\right|\right| = \frac{f''(x)(-f'(x),1)}{(f'(x)^2+1)^\frac{3}{2}}$$ — Preceding unsigned comment added by Widener (talk • contribs) 11:30, 4 November 2011 (UTC)
 * An elementary approach is to first be convinced this is true when $$f'(x)=0\;\!$$, then show it for general f' by rotating the coordinate system. -- Meni Rosenfeld (talk) 12:08, 4 November 2011 (UTC)
 * Or did you derive it a different way? Widener (talk) 11:18, 4 November 2011 (UTC)
 * That's basically it. In physics it is known that centripetal acceleration (which is orthogonal to velocity) is $$\frac{v^2}{R}=v^2\kappa$$. It is also known that the tangential acceleration is the rate of change of speed, which for constant speed is 0. The speed is 1 so the acceleration is just the curvature in the normal direction.
 * There are other ways. You could reparameterize the curve with arc length, and then it's just the second derivative of this curve. -- Meni Rosenfeld (talk) 11:29, 4 November 2011 (UTC)
 * That's what I tried to do first. Reparametrizing $$(x,\log x)$$ by arclength is messy. You have to integrate $$\sqrt{1+\frac{1}{x^2}}$$Widener (talk) 11:31, 4 November 2011 (UTC)
 * Yeah, that's a bit messy, and later you also need to invert it. But for your purposes I don't think you need to do this explicitly. Just denote $$l(x)=\int_1^{x}\sqrt{1+\frac{1}{t^2}}\ dt$$ and refer implicitly to $$l^{-1}(s)$$. In the end you should get the results without too much messy calculations. -- Meni Rosenfeld (talk) 12:08, 4 November 2011 (UTC)
 * Like this?
 * $$\frac{d^2}{dx^2} (l^{-1}(x), \log(l^{-1}(x))$$


 * $$=\frac{d}{dx} \left(\frac{1}{l'(l^{-1}(x))}, \frac{1}{l'(l^{-1}(x))l^{-1}(x)}\right)$$


 * $$=\left(\frac{l(l^{-1}(x))}{l'(l^{-1}(x))^3}, \frac{1}{l'(l^{-1}(x))^2l^{-1}(x)^2}+\frac{l(l^{-1}(x))}{l'(l^{-1}(x))^3l^{-1}(x)}\right)$$


 * I have a headache so I will evaluate this later, but tell me if this is the what you meant. Widener (talk) 23:56, 4 November 2011 (UTC)
 * Sounds about right, but I'd use s for the arclength variable. Use the facts that $$x=l^{-1}(s)$$ and $$l'(x)=\sqrt{1+f'(x)^2}$$. -- Meni Rosenfeld (talk) 15:58, 5 November 2011 (UTC)

Weighted least squares line fit in parametric form in 3D
I want to fit an optimal (least squares) line through a set of 3D n points so that the line is expressed as an origin (a point on the line) plus a direction (normalized 3D vector). What I want to minimize is the sum of the squares of the orthogonal distances to the line from each point.

From a paper I found I gather that this can be done by using the average point (sum of points divided by n) as the origin and using SVD to get the direction as follows:


 * build an n x 3 matrix with row_i being the x, y and z of (point_i - average point) - call this A
 * using SVD, get the singular vector of A corresponding to the smallest singular value - this is the direction

But what do I do if I want to add weights? That is, I want to minimize the sum of the squares of the (orthogonal distance x corresponding weight) values to the line from each point. The discussion on total least squares seem to touch on this (where they talk about covariance matrices) but I just need a simple solution for per point weightings. — Preceding unsigned comment added by 196.215.72.144 (talk) 19:09, 2 November 2011 (UTC)
 * The following should work (but if you have some way to test this it would be great). Let row_i of A be (sqrt (weight of point_i)) * (point_i - weighted average point). Then proceed with the SVD as before. -- Meni Rosenfeld (talk) 21:10, 2 November 2011 (UTC)
 * ...But to me it seems you're supposed to use the largest singular value, not the smallest. -- Meni Rosenfeld (talk) 05:02, 3 November 2011 (UTC)


 * I'll try that. Yeah, to me largest singular value also makes more sense - I think the paper has a typo because that's the normal to the best plane fit. It makes sense, a line fit would be the most "stretched out" direction (largest singular value) and a plane fit normal would be the most "squashed" direction (smallest singular value). Here is the link to the paper: http://www.udel.edu/HNES/HESC427/Sphere%20Fitting/LeastSquares.pdf. I'll post back here with some experimental results; would be great if I could know though for sure that the suggested solution was optimal and unique. 41.164.7.242 (talk) 07:38, 3 November 2011 (UTC) Eon


 * Thanks, tested and it works beautifully. It makes perfect sense to me, because you can achieve the same calculating the SVD of the 3x3 A^TA. In calculating A^TA the sqrt(weight of point_i) factor causes (weight of point_i) to be the effective weight by which that points contributes to A^TA, similar to how with normal equations the weights contribute to A^TA. 41.164.7.242 (talk) 13:33, 3 November 2011 (UTC) Eon
 * Yeah, that's how I came up with it, I started with what I'd want to do to A^TA and worked backwards.
 * The solution is unique as long as the highest singular value is single. If it's double or triple you'll have 1 or two degrees of freedom. For example, if the points are on a regular polygon, any direction in the polygon's plane will be as good. -- Meni Rosenfeld (talk) 15:10, 3 November 2011 (UTC)