Have you ever wondered if you could calculate how long is a certain curved path with a “simple formula”? Apparently you can, provided that you are good with integrals (or you can use Wolfram Alpha or Matlab). I am no mathematician and this is by no means a rigorous proof, however I think it surely delivers a first grasp on the underlying concepts.
A first approach could be use a real meter, but then you’d have to deal with the uncertainty that comes with every measurement and bla bla bla… From the deep magic forest of calculus, another approach to lines could become very handy: consider for instance an arbitrary curve S
by considering this as a limit in which the change in S approaches ds and applying the Pythagorean theorem we can write:
Now if your line is in parametric form we just divide by dt squared, if it is in the form f(x) then you can divide by dx squared and then integrate with respect to dx. For this example I am assuming S is in parametric form as such:
Dividing by dt squared yields
and after some manipulations we can integrate and get the length of our line from a to b
Suppose we’d like to calculate the length of the arc of our parametric function from 0 to 10, then assuming my calculations are correct, we’d have to calculate
Now perhaps this is easy to calculate manually, perhaps it isn’t, however it is surely fun to implement in some programming language. Sadly the sympy module in Python for symbolic maths does not work on this integral, it just seems to loop forever, perhaps that’s just my computer or I wrote something wrong. Therefore I used Matlab, which, aside from being somewhat difficult to start on my computer, works perfectly for this kind of tasks. In red is the arc whose length we’d like to calculate.
My simple Matlab script spits out as a solution the number 10.7602 which double checked on Wolfram Alpha seems to be the right solution.
To be fair my code prints out this: log(4*410^(1/2) + 81)/8 + 1640^(1/2)/4 which then computed yields the final result. Here below you can check my code
very nice article i'll write-up quickly i really certain love our sites page.i reading this sites gonna very interesting.
ReplyDeleteAngularjs Online Training
Angularjs Training in Chennai