Author Topic: First year college CALCULUS and PHYSICS, I can teach. Send PM  (Read 10955 times)

0 Members and 2 Guests are viewing this topic.

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 1440
Re: First year college CALCULUS and PHYSICS, I can teach. Send PM
« Reply #50 on: December 10, 2023, 02:03:12 pm »
   In the illustration here I've added an Xtra feature to try and get the most general case.
Shown us a little rocket motor, let's say the object (we want to characterize) is attached to a rocket motor, before the free-fall phase of downward motion (now considered as a positive direction just to simplify, as ianb has suggested).
   The reason I'm doing this is to get a general equation, rather than just the '1/2 AT squared' term.  Either we could have the rocket motor accelerate, say at 5 newtons per second per second, or just have it give a push at the beginning (looks better).
That way you've got all the terms expressed

But actually, the simple equation can still work, even in some cases that seem complicated.

Consider the illustration below. Someone fires a stone from a catapult up onto the roof of a building. If the launch velocity of the stone is 10 m/s, at an angle of 80°, starting 1 m above the ground, and if the building is 4 m high, how long does it take before the stone lands on the roof? Assume that air resistance can be neglected.

To work the solution, we can use the equation derived earlier:
$$s=ut+\textstyle{\frac12} at^2$$
To work out the time of rise and fall, we only need to consider the vertical component of velocity, acceleration and distance, and we can ignore the horizontal component. So first of all, we can find the vertical component of the initial velocity. This is found with trigonometry:
$$u_y=u\sin(80^{\circ})=(10)(0.985)=9.85\,\mathrm{m/s}$$
Secondly, we have the total distance traveled:
$$s_y=4-1=3\,\textrm{m}$$
Since we are using up for the positive direction, then the acceleration due to gravity is negative:
$$a_y=-g=-9.81\,\textrm{m/s}^2$$
Now we can plug the numbers into the formula:
$$s_y=u_y t+\textstyle{\frac12} a_y t^2$$ $$3=(9.85)t+\textstyle{\frac12}(-9.81)t^2$$
This is a quadratic equation we can solve for \$t\$. We get two solutions:
$$t=0.37\,\textrm{s}\;\;\textrm{or}\;\;t=1.63\,\textrm{s}$$
The first time will be on the way up, and the second time will be on the way down. So the answer we are looking for is the second one, and the time to land on the roof is 1.63 s.

Hi,

Another thing you reminded me of from Calculus was Arc Length.
For a curve like that parabola:
y=A*x^2+B
we have:
g=sqrt(1+(dy/dx)^2)
s=integrate(g,x,a,b)
where 'a' is the starting 'x' position and 'b' is the ending 'x' position, 's' being the total arc length.
dy/dx is of course the first derivative.

This is interesting because it gives us the entire length of the arc formed from the start to the end.

I remember a long time ago there was a Q Basic program that had apes throwing bananas at each other.  One was controlled by you and the other by the program.  Your goal was to hit the computer ape, and the computer ape goal was to hit you with a banana.
The formula used to generate the path of the bananas was of course the parabola and that is the basic projectile motion expression.
 

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 1440
Re: First year college CALCULUS and PHYSICS, I can teach. Send PM
« Reply #51 on: December 10, 2023, 02:16:05 pm »
     Creating and Solving Integrals, using Analytic Geometry:

 _______-----------_________-------------________------
   By dividing up into smaller areas, the classic solution, for obtaining the area under a curve, can be determined, if maybe only approximately.
   Nice thing is that, by design, those areas can be made smaller and smaller;  meanwhile the sheer quantity (of infinitesemals) of the partitioned areas grow (rapidly!).

   For example, (see diagram): you could have two pieces, or areas, and then go with four pieces.  Obviously you also have each piece at half the area as before.

Hi,

This is all about shape, and this reminds me of the old adage, "You can't fit a square peg in a round hole".

Funny thing is, YOU CAN.  All you have to do is make sure the square peg is smaller than the round hole and it fits through, and if the square is the right size, the four corners just barely touch the circles perimeter.

Now if we find the area of the square it will be very roughly the same area as the circle, albeit with a somewhat large error.  Making the square smaller and increasing the number of squares, the smaller squares can make a better approximation as the smaller ones start to fill in the gaps between the sides of the original big square and the circle perimeter.  The smaller you make the squares the more you need to fill in the circle, and the more you use the better  the approximation of the sum of squares becomes to the total area of the circle.  As the squares approach an infinitesimally small size the number of squares approaches infinity, and we get a perfect fit so that the area of all the squares exactly equals the area of the circle.

So who says you can't fit a square peg in a round hole, I don't think Newton ever said that  :)

This is also one of the features of using the properties of infinity.  You can have two quantities that are infinite in nature, yet maintain a finite ratio to each other like 2/3, 9/11, 5/6, etc.







 

Online Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6264
  • Country: fi
    • My home page and email address
Re: First year college CALCULUS and PHYSICS, I can teach. Send PM
« Reply #52 on: December 10, 2023, 05:38:59 pm »
I warmly recommend using wxMaxima, a free computer algebra system for Windows, Mac OS, Linux, and other operating systems.

I'm very familiar with numerical integration of particle trajectories.  I used to do molecular dynamics simulator development using non-quantum mechanical classical potential models and force field models, which model the total force acting on each atom in a simulation, then use discrete time steps and predictor-corrector models to integrate the particle trajectories at very high precision over time.

I like to use \$t\$ for time, \$x\$ for position, \$v\$ for velocity, \$a\$ for acceleration, \$j\$ for jerk or jolt, and \$s\$ for snap.

This is one of my favourite examples:

What kind of acceleration/velocity should a train or elevator have, so that it would feel the smoothest to us humans?

We want everything to be standstill (zero) at time \$t = 0\$, and maximum velocity reached at time \$t = T\$ with zero acceleration left, and maximum acceleration \$A\$ at midpoint during acceleration, \$t = T/2\$.  Let's start with a generic cubic polynomial for the jerk:
$$j(t) = J_3 t^3 + J_2 t^2 + J_1 t + J_0$$
This also gives us snap (the rate of change in jerk):
$$s(t) = \frac{d j(t)}{d t} = 3 J_3 t^2 + 2 J_2 t + J_1$$
and acceleration (jerk being the rate of change in acceleration):
$$a(t) = \int_{0}^{t} j(\tau) d\tau = \frac{J_3}{4} t^4 + \frac{J_2}{3} t^3 + \frac{J_1}{2} t^2 + J_0 t$$
Note that because these are definite integrals (integrals over a specific interval), there is no integration constants added.

The requirements we have are
$$\left\lbrace \begin{aligned}
j(0) &= 0 \\
j(T) &= 0 \\
a(0) &= 0 \\
a(T/2) &= A \\
a(T) &= 0 \\
\end{aligned} \right . \quad \iff \quad \left\lbrace \begin{aligned}
J_0 &= 0 \\
J_3 T^3 + J_2 T^2 + J_1 T + J_0 &= 0 \\
0 &= 0 \\
\frac{J_3}{64} T^4 + \frac{J_2}{24} T^3 + \frac{J_1}{8} T^2 + \frac{J_0}{2} T &= A \\
\frac{J_3}{4} T^4 + \frac{J_2}{3} T^3 + \frac{J_1}{2} T^2 + J_0 T &= 0 \\
\end{aligned} \right .$$
This is a system of equations we can solve.  (If there was no solution, we'd need to bump \$j(t)\$ one degree higher, until a solution exists.)

The solution is \$J_0 = 0\$, \$J_1 = 32 A / T^2\$, \$J2 = -96 A / T^3\$, and \$J3 = 64 A / T^4\$:
$$\begin{aligned}
s(t) &= \frac{192 A}{T^4} t^2 - \frac{192 A}{T^3} t + \frac{32 A}{T^2} \\
j(t) &= \frac{64 A}{T^4} t^3 - \frac{96 A}{T^3} t^2 + \frac{32 A}{T^2} t \\
a(t) &= \frac{16 A}{T^4} t^4 - \frac{32 A}{T^3} t^3 + \frac{16 A}{T^2} t^2 \\
v(t) &= \frac{16 A}{5 T^4} t^5 - \frac{8 A}{T^3} t^4 + \frac{16 A}{3 T^2} t^3 \\
x(t) &= \frac{8 A}{15 T^4} t^6 - \frac{8 A}{5 T^3} t^5 + \frac{4 A}{3 T^2} t^4 \\
\end{aligned}$$
Let's say that the final velocity (at time \$t = T\$) the velocity is \$V\$:
$$v(T) = V = \frac{8 A T}{15} \quad \iff \quad A = \frac{15 V}{8 T}$$
The distance traveled during acceleration is \$x(T) = 4 A T^2 / 15 = T V / 2\$.

Maximum acceleration or deceleration occurs when its derivative (jerk) is zero; at \$t = T/2\$, when \$a(t) = a(T/2) = A\$.  (The two other extrema are \$t = 0\$ and \$t = T\$, but \$a(0) = a(T) = 0\$.)

People are most likely to stumble when the magnitude of jerk is maximum.  The extrema of a continuous differentiable function occur when its derivative is zero, i.e. when snap is zero, \$s(t) = 0\$.  \$s(t)\$ is a second degree function, so the roots are easily calculated, and are \$t = T/2 \pm T/\sqrt{12}\$, or \$t \approx 0.2113 T\$ and \$t \approx 0.7887 T\$.  There, \$j(t) = \pm16 A / (\sqrt{27} T)\$, i.e. maximum magnitude of jerk is \$16 A / (\sqrt{27} T) \approx 3.0792 A/T \approx 5.7735 V/T^2\$.

While the velocity is a fifth-degree polynomial and position six-degree polynomial, finding say "time \$t\$ when the elevator/train has moved distance \$L\$" is relatively simple to do numerically, when \$T\$ and \$A\$ (or \$V\$) are known: the key is realizing that position \$x(t)\$ and velocity \$v(t)\$ are monotonically increasing functions for \$0 \le t \le T\$, so both Newton's method and the bisection method starting with \$t=0\$ and \$t=T\$ will find a single solution \$x(0) \le L \le x(T)\$ and/or \$v(0) \le V \le v(T)\$.
Algebraic solutions may or may not exist, but even when they do, they tend to be annoyingly complicated to calculate.

For example, if \$T = 1\$, \$A = 15/4 = 3.75\$, then \$V = 2\$, and \$x(t) = 2 t^6 - 6 t^5 + 5 t^4\$.  \$x(0) = 0\$ and \$x(T) = x(1) = 1\$.  Then, \$x(1/2) = 5/32\$, \$x(1/4) = 29/2048\$, \$x(3/4) = 1053\$.

By Newton's method, \$f(t) = x(t) - L = t^4 ( 2 t^2 - 6 t + 5 ) - L\$, \$d f(t) / d t = f'(t) = v(t) = 12 t^5 - 30 t^4 + 20 t^3\$.  Iteration is
$$t_{n+1} = t_{n} - \frac{f(t_{n})}{f'(t_{n})} = (10 t^6 - 24 t^5 + 15 t^4 + L) / (12 t^5 - 30 t^4 + 20 t^3)$$ and \$t_0 = 1/2\$ is a good starting point for any valid \$L\$ (\$0 \le L \le 1\$).
For example, for \$L = 0.5\$, \$t_1 = 0.84375\$, \$t_2 \approx 0.745861\$, \$t_3 \approx 0.7420736\$, and \$x(0.7420736) \approx 0.500016\$, so one only needs a few iterations to get a pretty good numerical solution.  If you clamp each \$t_n\$ to the valid range (\$0 \le t_n \le T\$), it will converge, because both position and velocity are monotonically increasing functions within this range.
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 11892
  • Country: us
Re: First year college CALCULUS and PHYSICS, I can teach. Send PM
« Reply #53 on: December 10, 2023, 09:17:52 pm »
What kind of acceleration/velocity should a train or elevator have, so that it would feel the smoothest to us humans?

That's kind of interesting, but is there a practical control system that delivers that profile? In my experience, trains want to accelerate and decelerate as fast as possible to minimize the time between stations, shorten journey times, and allow a higher train frequency. So the typical control scheme applies as much power as possible from a standstill to maximize acceleration, which naturally can produce a significant jerk for passengers. On a multiple unit train with many driven wheels, the practical limit is what G-force can the passengers withstand without complaining when the train starts and stops? (Wheel slip is not a constraint on such a train unless the track is greasy.)

A more realistic problem to solve would be whether it is possible to minimize jerk while still obtaining a short journey time between stations? How much longer would the journey time become?
 

Online Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6264
  • Country: fi
    • My home page and email address
Re: First year college CALCULUS and PHYSICS, I can teach. Send PM
« Reply #54 on: December 10, 2023, 10:40:39 pm »
That's kind of interesting, but is there a practical control system that delivers that profile?
Kone elevators, for example.  It's not exactly this, but it is derived using similar steps.

A more realistic problem to solve would be whether it is possible to minimize jerk while still obtaining a short journey time between stations? How much longer would the journey time become?
Even at modest accelerations and few kilometers/miles between stations, the travel time is limited by the maximum allowed velocity \$V\$.

I already calculated that at the end of acceleration, the velocity is \$v(T) = V = 8 A T / 15\$ and distance \$x(T) = 4 A T^2 / 15 = V T / 2\$.
(I will name units within brackets [ ] below.  For example, 50 [m/s] means 50 meters per second.)

Let's say the maximum acceleration \$A\$ is 1 [m/s²].  This corresponds to constant acceleration from 0 to 100 km/h in a bit under 28 seconds.  Let's say the maximum velocity \$V\$ is 180 [km/h] = 50 [m/s].  Because \$V = 8 A T / 15\$, \$T = 15 V / (8 A)\$ or 93.75 [s].  During this time, the train has traveled a distance of \$4 A T^2 / 15 = V T / 2\$ or 2343.75 [m], or less than two and a half kilometers.

Because of symmetries, if the train starts decelerating immediately after it reaches the maximum velocity, it will travel twice that distance (4687.5 [m]) in twice that time (187.5 [s], or a bit over three minutes).  The average velocity is therefore 4687.5/187.5 [m/s] = 25 [m/s], or 90 [km/h].

If the train were to use maximum constant acceleration, \$a(t) = A\$, then \$v(T) = A T\$ and \$x(T) = A T^2/2\$; thus \$T = V/A\$, i.e. 50 [s], and \$x(T)\$ = 1250 [m].  If it travels the middle part at constant maximum velocity, that'd be 4687.5 [m] - 2 × 1250 [m] = 2187.5 [m].  If it then decelerates at the same constant rate as it accelerated, the entire duration for the 4687.5 [m] trip would therefore be 50 [s] + 50 [s] + 2187.5/50 [s] = 143.75 [s], thus average velocity 4687.5/143.75 [m/s] ≃ 32.61 [m/s] ≃ 117.4 [km/h].

In general, the scheme I showed slows down any trip longer than 4.7 km by 187.5 [s] - 143.75 [s] ≃ 44 [s], compared to constant acceleration and deceleration to/from the maximum velocity, when the maximum velocity is 50 [m/s] = 180 [km/h] and maximum acceleration is 1 [m/s²] (about tenth of a G).

However, because of the smoothly varying jerk, the maximum acceleration using this kind of smooth scheme can be higher than in the constant acceleration (or jerkier acceleration) schemes.  It matters much more for elevators, though, because there the smooth jerk and continuously varying acceleration is easier on the power chain.  You can easily plug in your acceleration and maximum velocity figures, approximating 1 [floor] = 3 [m] to the equations above, and experiment.
« Last Edit: December 10, 2023, 10:45:02 pm by Nominal Animal »
 

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 1440
Re: First year college CALCULUS and PHYSICS, I can teach. Send PM
« Reply #55 on: December 11, 2023, 10:11:30 am »
What kind of acceleration/velocity should a train or elevator have, so that it would feel the smoothest to us humans?

That's kind of interesting, but is there a practical control system that delivers that profile? In my experience, trains want to accelerate and decelerate as fast as possible to minimize the time between stations, shorten journey times, and allow a higher train frequency. So the typical control scheme applies as much power as possible from a standstill to maximize acceleration, which naturally can produce a significant jerk for passengers. On a multiple unit train with many driven wheels, the practical limit is what G-force can the passengers withstand without complaining when the train starts and stops? (Wheel slip is not a constraint on such a train unless the track is greasy.)

A more realistic problem to solve would be whether it is possible to minimize jerk while still obtaining a short journey time between stations? How much longer would the journey time become?

I have to wonder if there is a more natural limit to the 'jerk' on a train, both starting and stopping.
If there is limited available power vs weight (mass) and friction, the train can only take off so fast anyway.
Also, I seriously doubt if a train can stop on a dime, so the question is, just how big of coin would it take (that is, what is the shortest time it can stop in, period).

Oh yeah that's another thing, friction.  I believe friction will bring some exponentials into the solution.
 

Online Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6264
  • Country: fi
    • My home page and email address
Re: First year college CALCULUS and PHYSICS, I can teach. Send PM
« Reply #56 on: December 11, 2023, 11:56:53 am »
Turbulent fluid or aerodynamic drag is F ∝ v² (drag equation), laminar is F ∝ v (Stokes' law), and sliding friction is independent of velocity.

For simulating motion based on discrete time steps and varying forces, velocity Verlet integration is often used to obtain the Newtonian trajectories.  (However, Gear5 (Gear, C. W., Numerical Initial Value Problems in Ordinary Differential Equations, Prentice-Hall, Englewood Cliffs, N. J., 1971) and Martyna-Tuckerman (Martyna and Tuckerman J. Chem Phys. 102 (1995) 8071) integration are more accurate at similar time step sizes, albeit more complex.)

It would not be difficult to create a self-contained HTML+CSS+JavaScript page (that one can open locally in a browser, no network connection needed) to say simulate a 2D or 3D box (with boundaries or with periodic boundary conditions) with one or more particles, points or spheres, using Newtonian mechanics and velocity Verlet integration.

Simple systems, like say a cannonball or golf ball, can also be solved piecewise analytically.  That is, between events like "exits the cannon" or "is hit by a club", and "hits and bounces from the ground/wall", where all parameters are continuous and sufficiently differentiable during the time interval, the trajectory can be calculated analytically for each interval separately.  While one could consider this more accurate, in real life the numerical results from sufficiently short time steps are just as accurate.  Where this matters, is in space simulations with accelerated timeframes, where otherwise the discrete time steps would be too long, accumulating integration error.  (If I recall correctly, even Kerbal Space Program has had issues with exactly this.)

But, before one goes that far, one should learn basic linear algebra, especially vector algebra (dot product, cross product, normalization, vector-matrix multiplication), plus if any kind of rotations are involved, either bivector or quaternion rotation (the component-wise math is the same for those), as they can represent all orientations and changes in orientation without issues like gimbal lock that plagues Euler and Tait-Bryan angles.  Transformation matrix orthonormalization is hard, but I could write a basic primer on bivectors/quaternions sufficient for geometry processing and 3D projection (including things like realistic attitude thrusters on a spacecraft) if anyone is interested, because I'm extremely familiar with their use.  I could perhaps start a new thread about that in the Programming sub-forum, if there is interest?
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 11892
  • Country: us
Re: First year college CALCULUS and PHYSICS, I can teach. Send PM
« Reply #57 on: December 11, 2023, 02:54:07 pm »
I have not heard of Verlet integration before. I will read up on it.

I would also note that in my experience, the Gear method (a variable order, variable time step predictor-corrector method) tends to be weak when applied to "complex" systems that do not have smooth, clean, continuous functions with precise derivatives. Any kind of discontinuous behavior will severely disrupt the integrator. Such disruptions may include external disturbances being introduced to the system, or numerical "noise" in the system such as inner sub-problems that have iteration with numerical convergence tolerances. Also, without any external constraints on the solver, the Gear method will try to capture all the frequency dynamics of the system, including very high frequency components that we might not care about and wish to filter out.

Often a simpler integrator will be sufficiently accurate and will be more robust. When a system is dominated by external forcing functions, then first order implicit Euler works remarkably well. If a first order integrator is not suitable, such as when the system is dominated by internal dynamics, the second order trapezoidal method can be very effective.
« Last Edit: December 11, 2023, 04:25:23 pm by IanB »
 

Online Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6264
  • Country: fi
    • My home page and email address
Re: First year college CALCULUS and PHYSICS, I can teach. Send PM
« Reply #58 on: December 11, 2023, 07:21:29 pm »
I would also note that in my experience, the Gear method (a variable order, variable time step predictor-corrector method) tends to be weak when applied to "complex" systems that do not have smooth, clean, continuous functions with precise derivatives.
True.  I've only used it in molecular dynamics simulations, where interactions are definitely such; and in particular, the "bonds" between particles tend to have a harmonic potential energy well near the equilibrium point.  That's the kind of interactions it was developed for.

The difference between leapfrog integration and velocity Verlet integration is that in the latter, velocity and position are calculated at the same points in time, whereas in the leapfrog method, velocities are updated half a time step offset from positions.

The theoretical modeling can feel a bit odd when first reading it, but if you play around how exactly the calculations are done for even a single particle, it really is quite straightforward; so much so that programmers without the basic physics background will likely end up "reinventing" the leapfrog integration on their own (but not understand all the implications and details of such a model).  As long as the time steps are kept sufficiently short, both velocity Verlet and leapfrog integration will produce very realistic results.



In the mid-1990s, I played quite a few rounds of Scorched Earth while having beers with my friends.  Good times. ;D

There is an entire genre of these artillery games.  Occasionally, I've wondered whether one should reimplement one of those using HTML+JavaScript+Canvas, using WebSockets for networked play and trajectory arbitration.
 

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 1440
Re: First year college CALCULUS and PHYSICS, I can teach. Send PM
« Reply #59 on: December 12, 2023, 12:40:49 pm »
Hi,

This turned into an interesting discussion.  I meant to show how the calculation for that one question was done but didn't get to it yet as I have a few other things going on right now.

On the subject of integration techniques though there has been some more progress.

With the advent of multi-core CPU's some 'new' methods have been ushered in that can take advantage of the parallel processing that multi-core CPU's are known for.  I say 'new' in quotes because they are somewhat new to me, in that I have never tried using any of these yet.  When I first started using numerical methods for these calculations back in the early 1980's there were no multi-core CPU's, or at least none that I could get ahold of at the time.  Now they are in every new personal computer.
Since they are somewhat specialized I can not say the newer methods will be good for every single application, but I am guessing they will work decently for the more basic electrical circuits.  I intend to find out though as I get to checking some of these methods out as they sound very promising.  Some of the pseudo-simulations I have done in the past can take a lot of time to complete, especially when there is more than one dimension involved.  The evolution of a numerical grid can take a while to calculate as it makes multiple passes.  Since you can get CPU's with a huge number of cores now, imagine say a 64 core CPU where each core can handle part of the problem.  Although the calculation would not be able to go a full 64 times faster just because there are 64 cores, It would guess it would still be a lot faster.  That's if the method was applicable in the first place.
The good news is there is more interest in this area now since multiple core CPU's are a mainstay in computers now.  That means more research into these techniques.

BTW, one of my least favorite methods was the Adams-Bashforth method I originally tried way back then too.  When used for some electrical circuit calculations it would seem to add its own unusual harmonics or something so the solutions would not come out smooth as they should but ratther with little 'humps'.  It was kind of funny really to see that print out.
« Last Edit: December 12, 2023, 12:45:01 pm by MrAl »
 

Offline RJSVTopic starter

  • Super Contributor
  • ***
  • Posts: 2121
  • Country: us
Re: First year college CALCULUS and PHYSICS, I can teach. Send PM
« Reply #60 on: December 17, 2023, 07:41:30 pm »
   Oops;  Sorry about delays.
   My plan is, to show a process where successive approximation attempts helped while (Newton and others) brought the Differential Calculus foundation forward ...
I say this partially 'tongue in cheek' as it's likely not a perfect historical layout.  But looking at graphical solutions helps get a contextual feel for the invention process that, maybe, happened.
   By putting focus on a graphical solution we need to look at polygonal areas, that gets more specific using trapezoid shaped areas...that's where you have 3 sides at 90 degrees orientation to each other, while a forth side has a slanted line (at top).  That's the curve-fitting portion.

   Meanwhile, the aspects of the curve fitting are brought into an already established domain of mathematics; that was concepts of limits, and infinitesimals.  If solutions for the area under any general curve can be had, by applying the therims in a new way, then that's useful.

Sorry about delays in posting...work responsibilities have added up, rather than the 2 weeks off, originally planned.  Thanks.
 

Offline RJSVTopic starter

  • Super Contributor
  • ***
  • Posts: 2121
  • Country: us
Re: First year college CALCULUS and PHYSICS, I can teach. Send PM
« Reply #61 on: December 18, 2023, 05:47:42 am »
   You folks responding lately are AWESUM; makes me wonder, about all the amazing mathematical related bio's of people here.

   Also browsing WIKI on some more details of the history aspects.  The story I had gotten, first year calculus, was, uniquely, presented by a disabled, former race car driver.  (Obviously, he had tragically crashed, losing a leg in the process).  But this guy knew his calculus and especially the geometric constructions (employed by Newton).  The textbook I recall did also have a straightforward 'flow' that had later parts that built upon earlier simplier results.  That's the thing that, later, I've noticed right away...a distinct LACK of continuity or progressive building, one thing after another.
I think I lucked out, having that good teacher those first couple years.
 

Offline RJSVTopic starter

  • Super Contributor
  • ***
  • Posts: 2121
  • Country: us
Re: First year college CALCULUS and PHYSICS, I can teach. Send PM
« Reply #62 on: December 20, 2023, 08:38:36 pm »
   So I have a struggle understanding the exact details, in the leap of concept going from using delta numbers, even if very small, to using the conceptual infinitesimals.  It's helpful to sort-of keep also in mind, the dynamics of infinite series, limits, and convergence.  (That last one sounds a bit religious, I know...)

   One unexpected problem is that I had understood a function 'Slope' to be y over X.
But it's usually seen as ∆y over ∆x.  Or, as I'm thinking to be 'dx/dy' by regular thinking.
   At any rate, that leap, of concept in applying limits to some formula involving 'delta or ∆' evolves into the familiar dx/dy'.
   Looking at area under velocity curve, you can see where a similar term, of 1/2 of something squared, is a simple average!  That is, in my case where I wish to state everything in terms of a little differential between 'now', and a short time ago ...not the usual '1/2 At squared'.

   So you would have each equation in those terms. Starting position is simply at t0, and the next position is that plus a differential.  In this case it's 'aT', in velocity terms, or more literally would be the starting velocity plus a bit of posituve change, that being the delta T times 'a' or acceleration constant.
   To get the area under that velocity curve, you simply average and take 1/2 of result. That's where the '1/2' comes from, but then that result gets multiplied again (by the little ∆ time).
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 11892
  • Country: us
Re: First year college CALCULUS and PHYSICS, I can teach. Send PM
« Reply #63 on: December 20, 2023, 11:14:05 pm »
If acceleration is constant then you don't need calculus, simple arithmetic will work.

For example, the distance formula becomes:
$$s=\left(\frac{u+v}{2}\right)t$$
This is "the area under the curve", but if the acceleration is constant then the "curve" is a straight line and we have the simple average of the initial and final speeds.

If the acceleration is not constant, then we can let \$t\$ become smaller and smaller until we reach the limit of zero, and then at the limit the formula is again true.

Finally, we may recognize that \$v=u+at\$, so now we have:
$$s=\left(\frac{u+u+at}{2}\right)t$$
Simplified, this becomes:
$$s=ut+\textstyle{\frac12} at^2$$
 

Offline RJSVTopic starter

  • Super Contributor
  • ***
  • Posts: 2121
  • Country: us
Re: First year college CALCULUS and PHYSICS, I can teach. Send PM
« Reply #64 on: December 21, 2023, 03:16:06 am »
Thanks.   I did just realize, that I incorrectly stated the average (as being the two numbers multiplied), when it should be the SUM, that then gets divided down, by 1/2 to the average.
So, in my case it's that average height, of curve or line, multiplied by ∆t.

   It's hard to visualize, a general example relating just two points, without the whole graph (from 0 origin).
 

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 1440
Re: First year college CALCULUS and PHYSICS, I can teach. Send PM
« Reply #65 on: December 22, 2023, 01:18:56 pm »
   So I have a struggle understanding the exact details, in the leap of concept going from using delta numbers, even if very small, to using the conceptual infinitesimals.  It's helpful to sort-of keep also in mind, the dynamics of infinite series, limits, and convergence.  (That last one sounds a bit religious, I know...)

   One unexpected problem is that I had understood a function 'Slope' to be y over X.
But it's usually seen as ∆y over ∆x.  Or, as I'm thinking to be 'dx/dy' by regular thinking.
   At any rate, that leap, of concept in applying limits to some formula involving 'delta or ∆' evolves into the familiar dx/dy'.
   Looking at area under velocity curve, you can see where a similar term, of 1/2 of something squared, is a simple average!  That is, in my case where I wish to state everything in terms of a little differential between 'now', and a short time ago ...not the usual '1/2 At squared'.

   So you would have each equation in those terms. Starting position is simply at t0, and the next position is that plus a differential.  In this case it's 'aT', in velocity terms, or more literally would be the starting velocity plus a bit of posituve change, that being the delta T times 'a' or acceleration constant.
   To get the area under that velocity curve, you simply average and take 1/2 of result. That's where the '1/2' comes from, but then that result gets multiplied again (by the little ∆ time).

Hi,

If you have a little trouble thinking about how something like delta T turns into just T in the limit, you can think in terms of number progressions and that allows you to see the mechanics behind it.

For example, here is a number progression:
1, 2, 3, 4, 5, ...
you have no problem seeing where that is going, as well as:
5, 4, 3, 2, 1, ...
it's just getting smaller.
Also:
2, 4, 6, 8, ... or 8, 6, 4, 2, ...
where you might stop at zero with that last one.
Now how about this one:
1.1, 1.01, 1.001, 1.0001, 1.00001, ...
You can see that as we progress, the number is becoming closer and closer to '1'.  That's the heart of it.

The derivative is often defined as:
dy/dx=[f(x+h)-f(x)]/h as h approaches zero,
and since 'h' is the increment it might be written with h=dx as [f(x+dx)-f(x)]/h as dx goes toward zero.
So we really have this:
delta_y=f(x+dx)-f(x)
and
dx=delta_x.

If we look at a simple example of y=x^2 and we want the derivative, we can look at the progression of numbers
as we make Dx (delta_x) smaller and smaller.  Starting with 0.1 and x=3, we get:
Dy=f(x+Dx)-f(x)=(3.1)^2-3^2=0.61, and 0.61/0.1=6.1
and now let Dx go smaller to 0.01 instead of 0.1:
Dy=f(x+Dx)-f(x)=(3.01)^2-3^2=0.0601, and that divided by 0.01=6.01
then Dx=0.001:
Dy=f(x+Dx)-f(x)=(3.001)^2-3^2=0.006001, and that divided by 0.001=6.001
then Dx=0.0001:
Dy=f(x+Dx)-f(x)=(3.0001)^2-3^2=0.00060001, and that divided by 0.0001=6.0001
It becomes kind of obvious that this is heading toward 6.00000000000...
A check of course shows that the exact derivative is 6, but doing this sequence of numerical calculations we can start to get a feel for how Dy/Dx becomes closer and closer to the exact value.

You can do this with almost any of these problems.  You just have to watch out for numerical problems because calculators and computers alike always have limited precision in number representation.

For the corresponding integration, you can let Dx get smaller and smaller and see how the summation gets closer and closer to the exact value.









 

Online Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6264
  • Country: fi
    • My home page and email address
Re: First year college CALCULUS and PHYSICS, I can teach. Send PM
« Reply #66 on: December 22, 2023, 06:53:56 pm »
The very simple notion that 0.999... = 1, while initially odd/unbelievable, contains several useful realisations related to limits, calculus, and even geometry.
 

Offline RJSVTopic starter

  • Super Contributor
  • ***
  • Posts: 2121
  • Country: us
Re: First year college CALCULUS and PHYSICS, I can teach. Send PM
« Reply #67 on: December 24, 2023, 08:24:43 pm »
   Attached diagram shows what I've been (trying) to think about...in between the winter-like trips, and other cold-weathrr hassles.
   With a more simple function, like in basic physics the speed (or Velocity) of a free falling object, in steady gravity field, speed is going to be, simply the field constant times the elapsed time.
Off to the left, I've shown included is a more complicated curve of a function in general...you can surmise that the area under curve in the simple line case, will be easy to calculate, usung a center point or average value.
   That's going to be (y1 + y0) /2.   I think that (Newton) perhaps started thinking about applying limits and convergence ideas, to resolve any general problem (of area under curves).  Equivalent in my example, to using rectangles, of diminishing size, each iteration starting with polygons that are 4 sided, (with 3 sides oriented at 90 to each other.
 

Offline RJSVTopic starter

  • Super Contributor
  • ***
  • Posts: 2121
  • Country: us
Re: First year college CALCULUS and PHYSICS, I can teach. Send PM
« Reply #68 on: December 24, 2023, 08:36:42 pm »
   So if we are going to talk about comfort, vs Intimidation, in mathematics, that can be a difficult aspect, (especially with school tests and looming homework assignments).  It always helps myself, to remember what (the great one), Einstein remarked regarding math and algebra:
   " ...couldn't factor a basic ALGEBRA equation, to save my life ...".   (or something similar to that saying).
Math can be that way, harshly.  I know I get intimidated around the concepts used in Partial Derivative relations.   Best sometimes to just plunge forward anyway, and make good use of any lecture or video materials as they become available.
 

Offline RJSVTopic starter

  • Super Contributor
  • ***
  • Posts: 2121
  • Country: us
Re: First year college CALCULUS and PHYSICS, I can teach. Send PM
« Reply #69 on: December 24, 2023, 08:58:28 pm »
   Mr. AI:
   Your explanation looks to relate fairly directly, and I was also thinking about the parabolic function, (y = X squared).  That's what I've been thinking, of how to relate directly the approximate (closer and closer), vs the result when infinite terms are used.  I remember how the derivative is obtained, at least by ROTE or procedural memory.  Just trying to connect the dots, as to how that rote method, for obtaining a formula as a derivative of (another function derivative).
   Thanks for that recent explanation, (I'm wading thru that right now).

- - - Rick B.
 

Online Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6264
  • Country: fi
    • My home page and email address
Re: First year college CALCULUS and PHYSICS, I can teach. Send PM
« Reply #70 on: December 25, 2023, 04:47:40 am »
If you have a curve \$f(x)\$ you want to integrate from \$x_\min\$ to \$x_\max\$:
  • The simplest is Riemann sum using rectangles, also known as the midpoint rule.
    You sample the curve, modeling the curve as a sequence of rectangles, with the height of each rectangle determined at its midpoint by the curve.
    Mathematically this is equivalent to $$\sum_{i=1}^{N} f(x_i) w_i$$where \$i = 1 \dots N\$ denotes each interval or rectangle, \$x_i\$ its midpoint, and \$w_i\$ its width.  Note that \$w_1 = ( x_1 - x_\min ) / 2\$, \$w_2 = (x_2 - x_\min) / 2\$, \$w_{N-1} = (x_\max - x_{N-1})/2\$, \$w_N = ( x_\max - x_N) / 2\$, and \$w_k = \frac{x_{k+1} - x_{k-1}}{2}\$ for \$k = 3 \dots N-2\$.
     
  • If instead of midpoint, you pick the minimum or maximum value of the function \$f\$ within that interval, you get an upper or lower Darboux sum or integral, respectively.
     
  • If you know the value of the function at each point \$x_i\$, instead of a rectangle, you can approximate the area in that interval using a rectangle and a triangle.  This is known as the Trapezoidal rule.  Mathematically this is equivalent to $$\sum_{i=1}^{N-1} \frac{x_{i+1} - x_i}{2} \left( f(x_{i+1}) - f(x_i) \right)$$
    If you use \$N\$ regular intervals (\$N+1\$ values for \$x_i\$), then the approximate area under the curve is $$\frac{x_\max - x_\min}{2 N} \left( f(x_\min) + f(x_\max) + 2 \sum_{i=1}^{N-1} f(x_\min + i x_\Delta) \right), \quad \text{where } x_\Delta = \frac{x_\max - x_\min}{N}$$
     
  • Better approximations can be calculated by fitting a curve to each interval, for example using the next neighboring values of \$f\$ (i.e., a total of four samples of \$f\$ per interval) and a cubic curve.  Computationally, however, the trapezoidal rule is faster to calculate, so it is typically recommended to simply use the trapezoidal rule and more intervals (larger \$N\$).

    For annoyingly behaving functions, it can be even more useful split the intervals (recursively) for each interval where the function changes a lot.  Since the intervals are still regular, you end up only having division/multiplication by the number you split the interval into.  Splitting into power of two (2, 4, 8, 16, 32, 64, \$2^N\$) is extremely fast and efficient (with minimal effects wrt. rounding et cetera) when using standard IEEE 754 Binary32/Binary64 (float/double) floating-point numbers, as most computers nowadays do, so the numerical integration problem actually simplifies to detecting whether a function "behaves nicely" (is nearly linear enough) within a specific interval or not, in an efficient manner.
     
  • For high-dimensional functions and functions that can be easily numerically calculated but whose shape or behaviour is unknown, Monte Carlo integration can be very effective.  It means you sample the function value at \$N\$ uniform random values of \$\mathbf{x}\$ (being a vector, \$(x_1, \dots, x_D)\$, in Cartesian coordinates here).  If \$V\$ is the hypervolume of the bounds of \$\mathbf{x}\$ (\$V = x_\max - x_\min\$ for the one-dimensional case), then the approximate integral is
    $$\frac{V}{N} \sum_{i=1}^{N} f\left(\mathbf{x}_i\right)$$
    i.e. the range/area/volume/hypervolume of the region of \$\mathbf{x}\$ you sampled in, multiplied by the average value of \$f\$ thus sampled.

I know I should add a small illustration for each, but it's lazy holidays and I cannot be arsed to.  The linked Wikipedia pages have the illustrations anyway.
« Last Edit: December 27, 2023, 05:03:52 am by Nominal Animal »
 
The following users thanked this post: RJSV

Offline IanB

  • Super Contributor
  • ***
  • Posts: 11892
  • Country: us
Re: First year college CALCULUS and PHYSICS, I can teach. Send PM
« Reply #71 on: December 25, 2023, 09:52:40 am »
Attached diagram shows what I've been (trying) to think about...

Seems like you might be driving towards the Fundamental Theorem of Calculus

There's a lot of material there and you will need to work through it carefully.
 
The following users thanked this post: RJSV

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 1440
Re: First year college CALCULUS and PHYSICS, I can teach. Send PM
« Reply #72 on: December 25, 2023, 03:54:38 pm »
   Mr. AI:
   Your explanation looks to relate fairly directly, and I was also thinking about the parabolic function, (y = X squared).  That's what I've been thinking, of how to relate directly the approximate (closer and closer), vs the result when infinite terms are used.  I remember how the derivative is obtained, at least by ROTE or procedural memory.  Just trying to connect the dots, as to how that rote method, for obtaining a formula as a derivative of (another function derivative).
   Thanks for that recent explanation, (I'm wading thru that right now).

- - - Rick B.

Hello again,

In these approximations, as the increment used to form the straight line used for the approximation gets smaller, the straight line approximates the curve better so the approximation gets more accurate.  The increment is just the difference between two 'x' values used to calculate the function values which are two points on the curve itself.  Once we let the increment get infinitesimally small, the calculation for the derivative equals the tangent to the curve, and the calculation for the integral equals the area under the curve.

(See diagram)

For integration of the top curve, it's a straight line so the approximation is exact.  The can be found using the area of a triangle and the area of a rectangle added together.  The average area is what we are after, so we could just use the two end points and the width, and average the area using that.  that works because the average area is the area within the rectangle formed with a rectangle which has height that is halfway between the two 'y' end point values.  That height times the width gives us the area, and that is exact because the curve is a straight line.

For the bottom curve, do the same thing, but it becomes an approximation because we lose some of the area as shown above each straight line in red+violet for the blue points and in just violet for the green points.  Notice though that the error is less for the green points because they are closer together, while the error for the blue points is much greater.  That's because the straight line used in the approximation better approximates the curve for points closer together.  That means the closer we make the points, the better the approximation to the exact integral.

For the derivative, we can start with the point-slope form of a line in analytic geometry.  That is:
y=m*x+b
where
y is the 'curve',
m is the slope (derivative),
x is the independent variable (along the horizontal), and
b is the y intercept.

We don't care about the y intercept because when we do subtractions that goes away, so we can focus on:
y=m*x

Now solve for 'm' the slope and we get:
m=y/x

and that is the derivative of a straight line.

We do not have straight lines very often, so we have to look at curves.  To do that we need again two points instead of just one.
We can start with the two-point form of a line from geometry again:
y=x*(y2-y1)/(x2-x1)+b
and drop 'b' again and get:
y=x*(y2-y1)/(x2-x1)

and here y1 and y2 are the function values and x1 and x2 are just the 'x' values again.
Now since the y1, y2, x1, and x2 part is the slope again, we solve for that again and get:
y/x=(y2-y1)/(x2-x1)

Now when we look at the denominator, we can see that we have the difference in x's so we can call that Dx:
y/x=(y2-y1)/Dx

and when we look at the numerator, we see that is the difference in y's so we can call that Dy:
y/x=Dy/Dx

so what we have here is the derivative.

Now back to:
y/x=(y2-y1)/Dx

As we make Dx smaller (which is x2-x1) the approximation to the curve between y2 and y1 gets more accurate.  This means that the derivative gets more accurate.  As we let Dx get very very small, Dy/Dx gets very very accurate, and if we look at the progression of numbers as before, we will see it get closer and closer to the exact derivative.
It's actually in the limit as Dx goes toward zero that we see an exact derivative come out of it.
The progression of numbers would again look something like:
6.1, 6.01, 6.001, etc., and in the limit it would become 6 exactly (for that particular derivative at that particular point).

Now in the above, we think of Dx as:
Dx=x2-x1
but really we can use an increment to represent x2 because it is close to x1.  This means:
x2=x1+h
and since y2 and y1 are the functions of x1 and x2, we can rewrite the above:
y1=f(x)
y2=f(x+h)
x1=x
x2=x+h
and then:
Dy/Dx=[f(x+h)-f(x)]/[x1+h-x1]
which of course is:
Dy/Dx=[f(x+h)-f(x)]/h
with 'h' the increment.

and that is the one-sided derivative.

For a better approximation, we can use both a positive and a negative increment:
Dy/Dx=[f(x+h)-f(x-h)]/(h+h)

and this gives us a slightly better approximation to the derivative.

So really the main point is that as 'h' gets smaller, the two functions approximate the curve better because the straight line formed by the two functions becomes equal to the tangent of the curve, which is the derivative.
Note this is similar to how the integration worked also.  The straight line used in the approximation gets closer and closer to the tangent of the curve.

« Last Edit: December 25, 2023, 04:01:30 pm by MrAl »
 
The following users thanked this post: RJSV

Offline RJSVTopic starter

  • Super Contributor
  • ***
  • Posts: 2121
  • Country: us
Re: First year college CALCULUS and PHYSICS, I can teach. Send PM
« Reply #73 on: December 25, 2023, 08:21:09 pm »
Right now there's a 'toss-up' as to which is relevant, (historically in the discovery process), as to whether you show a complete and separate derivation, of each of the derivative, and of the integral.  That is, whether the reversability of the two calculus functions can be enough to get your INTEGRAL, after deriving the derivative.   That would involve building up a set or table of known integrals...when each derivative is determined.
   I find that the 'Summary in plain English' I can do very well (eventually, lol), whereas the exact formula manipulations are a (bulky) challenge.

   Many, many reaaaallly smart doctors and some teachers live in this so-called common sense 'gap' or bubble, often lacking common sense oversight, but meanwhile doing very well in their descriptive math.  It takes just a sheer volume of study time!
 

Offline RJSVTopic starter

  • Super Contributor
  • ***
  • Posts: 2121
  • Country: us
Re: First year college CALCULUS and PHYSICS, I can teach. Send PM
« Reply #74 on: December 27, 2023, 02:27:16 am »
Nominal Animal:
   ? Would you be able to to take a couple seconds, to explain something you outlined ?

   It's;       (X1 - X min.) and that was multiplied by two;   W1 = 2 (X1 - X min.)

   I didn't follow that, as to where the '2' came from, in the Rieman method.  Plus, actually, not making progress putting that (above formula) in a plain English and graphical context.
   Help appreciated !

Rick
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf