# How can I intuitively predict the shape of a solution to ordinary differential equations?

I am new to differential equations, and I realized that I don't have even an intuition as to what solutions to ordinary differential equations would roughly look like. For example, given the governing equation:

$$\frac{\partial^2 y}{\partial x^2} -\frac{\partial y}{\partial x} + y = 0$$

for the range $$0 given the initial conditions $$y(0) = 1$$ $$y(10) = 5$$

The plotted graph for the function y looks like: How can you intuitively predict that y will be mostly flat in the range 0<x<6?

If so, how would you intuitively picture the solution for this function y without solving for it analytically?

• It isn't really "mostly flat", it's that it's really steep between 6 and 10, which sets the scale between 0 and 6 to look like not much is happening.
– Ian
Oct 21 at 13:12
• @Ian thank you for answering! yes i see, could you have imagined this type of shape without solving for it explicitly? Oct 21 at 13:14
• In the case of a BVP like this where the coefficients are all comparable to one another, probably not. It's not as difficult with an IVP. Like if I replace the condition on the right with $y'(0)=-1$, then the first derivative is negative and the second derivative is positive, so it goes down, then turns around somewhere, then eventually the $y$ term might be strong enough to make it turn around again. But the behavior already looks quite different on long time intervals if I replace the coefficient of $y'$ with $-3$ instead of $-1$ (this "turn around again" thing doesn't happen).
– Ian
Oct 21 at 13:16
• To elaborate a little bit: sketching a solution without solving the equation is ultimately pretty much the same as running a low resolution numerical method. For an IVP, you can run something like forward Euler to get a general idea, and in doing so each new point is generated from just the previous point (where here a "point" is $(x,y,y')$). For a BVP you have to do something globally instead (unless you can guess really well to use a shooting method).
– Ian
Oct 21 at 14:09

With a little computation one sees that the characteristic polynomial $$0=r^2-r+1=(r-\tfrac12)^2+\tfrac34$$ has a complex pair of roots that result in an oscillatory solution with an amplitude growing like $$e^{x/2}$$. So an amplitude of about $$1$$ at $$x=0$$ grows to $$e^5=148.4...$$ The small value at $$x=10$$ can thus only be realized by locating a node of the oscillation close-by. As the wave length of the oscillatory factor is $$7.255...$$ the graph will thus contain one-and-a-bit periods, thus with a maximum of the amplitude at about $$x=7$$ to $$8$$.

• @ Lutz thank you for providing your thought processes for divining the shape! This is beyond me now, but will keep this in mind when i know more about odes. Oct 21 at 14:11

I don't think that it is possible to predict the shape of a general ordinary differential equation (ODE),i have found this tool useful to look at the behaviour of ODE's, it is best for first order ODE's.

but there are some that are more common (a quick note $$A$$ and $$B$$ are arbitrary constants)

• for example the simple harmonic oscillator
$$\frac{\partial^2 y}{\partial x^2} +k^2 y = 0$$ which has solutions $$y=A \sin(kx)+B \cos(kx)$$

• a related ODE is this one $$\frac{\partial^2 y}{\partial x^2} -k^2 y = 0$$ which has solutions $$y=A \sinh(kx)+B \cosh(kx)$$

• then there is the damped simple harmonic oscillator $$\frac{\partial^2 y}{\partial x^2} +k_0\frac{\partial y}{\partial x} +k_1^2 y = 0$$ which has solutions $$y=e^{x\alpha}(A \sinh(x\omega)+B \cosh(x\omega))$$ for constants $$\omega$$, $$\alpha$$ which depend on $$k_0$$ & $$k_1$$.

There are also solutions of commonly occurring ODEs that have less pretty forms

Hopefully that helps

• thanks very much. it's a relief to know from an experienced practicioner, I thought I am missing something important that I can't intuitively picture this in my mind... :) Oct 21 at 14:08
• @james i don't know if i am as experienced as others (have only been looking at ODE in uni for ~3 years), but they can be incredibly hard to solve and often depend on the initial conditions, there is even a million dollars offered to the solution of one
– Nyra
Oct 21 at 14:28

Slope Fields offer a good visual aid, sometimes almost showing the actual solutions. You only calculate the slope at select points using the given formula for the first derivative, so it's usually a somewhat less intensive process than solving numerically. Phase Portraits Have similar features and are more generalizable to second order differential equations. • How does this apply to second-order ODEs ? The equation does not allow computing the first-order derivative without knowledge of the second one... Or am I missing something ? Oct 22 at 5:45
• @VincentFourmond Added info on Phase Portraits that might be better for second order equations. Frequently a second order equation can be solved to first order and slopes of the resulting phase portrait figure convey visual information of the second derivative. Oct 22 at 18:05
• @VincentFourmond Additionally, it might be possible to graph first and second derivatives against the independent variable much the same way one might graph the real and imaginary of a complex number in the plane. Linear second order equations can be expressed as two first order equations. Differential equations expressed as Vector and Matrix equations work well for that analysis. Oct 22 at 18:11