Tracing a curve from set of dy/dx values

click_here

Joined Sep 22, 2020
548
The op has dx/dy values and wants to see if they could trace the integral of those values - Using Riemann sums is a method to do that...

>No links. Do it.
I couldn't demonstrate the method better than the Khan Academy video.
 

wayneh

Joined Sep 9, 2010
18,134
We’ve learned the OP has a time series dataset. That’s a vastly different scenario than the original problem because it means all the measurements are arranged in order by equal time intervals. In other words he has exactly what I said he needed, because x and t are in fact the same thing.

He doesn’t need to do any integration to get back to the y values. All he needs is the starting value and to then apply the series of percent changes.
 

MrAl

Joined Jun 17, 2014
13,769
Hello,
Lets say I have a set of dy/dx values taken at different times (t1, t2, t3 and so on....)...

Using these values, can I trace a curve of y = f(x)...??

If so, how...

Thanks in adv and regards
Rahul
(see illustration attached)

I got here a little late but here is another reply for you to consider.

Having only a set of derivatives is not enough. Since each is presumably equal to a different constant, that means you end up with a bunch of slopes, m1, m2, m3, etc., one for each time value you are given.

Since you have no other data, what this means is that all you can do is plot a slope field. You dont have enough data to be able to plot the graph of y(t).
The problem with trying to plot anything else is that there are two features that prevent this:
1. There are an infinite number of slopes for each time value, they pile on top of each other forming a pile that progresses to +infinity and -infinity on the y axis, although they all have the same slant.
2. Any slope in one pile of those slopes can connect to any one of the slopes in the next pile at the next time value (moving left to right in time). This means you cant even know the true shape of the curve. If you pick one lower slope at time t=1 and one higher slope at t=2 then you might be able to visualize a somewhat smooth curve, but if you pick one at time t=1 that is lower and at the next time value you pick another one on the same y level as the first, you end up with an "S" curve (an S on it's side).

The attachment illustrates this assuming all the slopes occur at equal time intervals and get progressively more horizontal from left to right and then progressively more vertical.
Pick any slope on the far left, then pick ANY slope just to the right of it. For any of the two slopes you pick, they could be connected. Since this can form an infinite number of shapes, i dont think you can conclude that there is a family of curves (like you can with more information). This means there is no way to plot any graph of y(t).
Looking at the attachement, the green line connects two slopes where the second one is higher than the first, and the red line connects two slopes that are right next to each other. See how different the resulting curve is. The green line and those two slopes makes it 'almost' a straight line, while the red line connects two such that the curve goes up and down and up again. Those two results are very different and so we can almost draw any graph we want, and that is even with the limited slopes being shown in the drawing. There are really an infinite number from the bottom to the top in any column.
Math is amazing though so maybe we can find a systematic trend in this mess, but i dont think it would do any good in any application because it would be far too variable. I wont claim this for certain just yet, but that's my guess.

NOTE: In spite of this, you may be able to assume that the next y value (for the center position of the next slope) is equal to the end of the slope just to the left. In that case you can draw a family of curves.
The crudest way to do this would be to just connect all the slanted lines forming a bunch of slanted lines connected end to end. The more elegant way would be to do a curve fit for all of the resulting points. There would be various choices for this such as 2nd order, 3rd order, etc. Check out "cubic splines" on the web for one of the possible methods.


SlopeField-01.gif
 
Last edited:
Top