I read through some more of my college differential equations textbook and I think I am ready to further tackle the snail problem (see yesterday’s post). In short, a snail crawls along a twig of length L0 at 1 cm/d, and the twig grows 2 cm/d. Will the snail reach the end, and when?
I got as far as this differential equation, which I believe is correct:
I read about a technique to solve linear first-order differential equations last night, so I’m going to try it here. First we put this into standard form:
Since we already have an x’ and an x, if only they were multiplied by another function μ and μ’ respectively, we would have an inverse of the product rule (μx)’ = (μx’ + μ’x). Of course we can’t multiply different parts of the equation by different functions; we’ll have to multiply the entire equation by the same function μ(t). This will put a μ term in front of the x’, so we have to select a μ that, when multiplied by the function in the second term, will result in μ’. Let’s take a detour to find this function.
This is a separable differential equation; we can get the μ terms on one side and the t terms on the other. (Incidentally, I don’t think we could have done that with the original equation, or I would have.)
I just realized we divided both sides by μ. I hope that was “allowed.” Of course we would have lost any solutions where μ = 0, though I’m not sure of the significance of that. In any case, I can’t stop now. Let’s integrate:
The left side is easy; it’s a standard rule.
The right side is essentially the same; we need to use the inverse of the chain rule.
Exponentiating both sides yields
I think we can absorb the ± into the constant (though I’m not positive).
Actually, we need a solution, not all solutions, so I’ll set the constant equal to 1. So dropping the ± was fine.
Armed with μ, we should now be ready to return to our earlier work. We’ll take our previous equation, in standard form,
and multiply both sides by the function μ:
We should now be able to a use the inverse of the product rule.
Integrating both sides gives
We’ll need to use the inverse of the chain rule again, so let’s set it up.
Multiplying both sides by 2t + L0 gives
Wow, we already solved for x. I wasn’t expecting it so soon. The solution is a little more complex than I’d expected, and I suspect I made a mistake somewhere. However, we should keep going. Let’s find the constant. The snail starts at position x = 0 at time t = 0, so
L0 is positive, so we don’t need the absolute value.
This is actually promising. Substituting c5 back into the equation we solved for x,
I want to get rid of the absolute value. I think we can. The natural logarithm is only defined for positive numbers (at least without using complex numbers), so the absolute value allows our function to be defined for all nonzero arguments (just like ). If I remove the absolute value function, then the logarithm and therefore the equation will not be defined for 2t + L0 < 0, or when t < –L0/2. Since negative time is meaningless in this example (the snail started at time t = 0), I don’t mind discarding those times. (As an aside, I haven’t kept the units, but the 2 in the denominator is actually 2 cm/d — the speed at which the twig grows. The time –L0/2 corresponds to the time at which the twig had length zero. Clearly it would be meaningless in this problem to consider times before this.)
Back to the problem:
And that’s it! That is the equation for the distance the snail has crawled, x, at any given time t. We haven’t actually answered the question of if the snail will reach the end and when that would be, but we can save that for the next post.