Calculate the shape of a curve given y coordinates and slope

curvesordinary differential equations

I apologise in advance if my description of the problem does not use the correct terminology but I'm still learning! Let me know if something is ambiguous or not clear and I'll try to rephrase it.

The Problem:

I would like to draw a curve/figure out the shape of a curve given the information in the following graph:

enter image description here

On the y axis, I'm showing the slope of my curve, and on the x axis I'm showing the height/y-coordinate of each point in my curve. I am missing information about the x-coordinates of my curve.

In this case, because the graph I have shown above is quite simple (a straight line indicating ever increasing slope), I can intuitively understand that my curve will have a shape similar to this:

enter image description here

However, I don't know exactly how to go about deducing this shape in the case of more complex curves, or even how to go about figuring out the shape of the curve I just showed you in a principled manner.

Importantly, I am also happy to make the assumption that a slope of 1 equals a change of one unit in the x axis of the graph where I'll draw my curve (I'm more interested in the shape of the curve, and it's shape relative to other curves deduced using the same method, than in the absolute value of the x axis coordinates).

It just seems like this is the kind of problem that might have already been solved by someone, but I don't really know how to search for the answer since I don't know what keywords to use.

In the example above, the graph telling me information about the curve showed a line y = 2x. However, I might have a graph whose information is not given by a simple mathematical equation (imagine a local regression curve, or a complicated spline).

Many thanks in advance.

Best Answer

The relationship between $\frac{dy}{dx}$ is a linear relationship with $y$. As you have shown in the question the line passes through the origin and has slope $2$.

Therefore,

$$\frac{dy}{dx} = 2y$$

$$\implies \frac{dy}{y} = 2 dx$$

Integrating both sides we get:

$$\log(y) = 2x + c$$

$$\implies y = ke^{2x}$$

The constant $k$ can be determined with some other condition on the relationship between $x$ and $y$.

If let's say it was given that $y(0) = 1$, then our curve would be:

$$y = e^{2x}$$

Your intuition about the shape of the curve was spot-on.