# Formulating Differential Equations

1. Sep 19, 2008

### Tac-Tics

One thing that's always bothered me is the idea of a taking the derivative of a variable when that variable isn't a function.

For example, the differential of an expression x^2 is 2x dx. But when x is given an a concrete value, let's take x=10, we say that the differential of 10 is 0 (because it's a constant). So, 2x dx = 2(10) d(10) = 20 * 0 = 0. In fact, for any value we pick for x, dx will vanish to 0. Now the reason we can get the right answer is because somewhere under the hood, we're talking about limits and because of that we can get away with dividing 0 by 0. But there's too much hand waving and not enough rigor for my mathematical blood!

What I want to know is... is there's a prettier way to formulate differential equations? What would you do to put them on a solid mathematical basis?

I've been wondering about this for a week or two, and the best idea I had was coming up with an idea that you could "promote" those boring variables to parametrized functions. Then, instead of relating their values (x = y^2+1), you'd relate their values when applied an argument (x(t) = y(t)^2+1). Then, the differential operation would be something analogous to the derivative with respect to the parametrized variable, t.... or something like that.

2. Sep 19, 2008

### smallphi

Not enought rigor for your mathematical blood - really LOL

The differential of the independent variable, dx, centered at point x0, has precise definition. It's the following function of x:

dx= x - x0

So you are right, the function dx of x is zero for x=x0 (=10 in your case). The function is linear so it's not zero at any other value of x.

The differential of the dependent variable y, centered at x0, is the following function of x:

dy= y'(x0) dx

These are EXACT equations-definitions. Nothing is assumed small so far.

The smallness enters when one tries to approximate increases in the function with it's differential cause y(x)-y(x0) is only approximately equal to dy. The smaller the dx, the better the approximation. In fact dy only takes into accound the first term in the Taylor expansion of y(x) around x0. It rejects the higher order terms and that's why it's not exactly equal to the increase of the function but close to it. A method to obtain the differential of a function is to expand it around x0, and see the term containing (x-x0), that is the differential dy and from it one can read the value of y'(x0). That makes many people think differentials are small things that don't have precise definition.

Differential equations relate derivatives not differentials, although sometimes when finding the solution by integration, it helps to convert the derivatives in terms of differentials which are NOT assumed small at this point but later when integrating to obtain a solution they have to be assumed infinitesimally small.

Last edited: Sep 19, 2008
3. Sep 19, 2008

### Tac-Tics

:-)

You threw in x0 without introducing it anywhere ;-)

Is that supposed to be x0 as in "ecks sub zero?" (in other words, a separate variable?)

4. Sep 19, 2008

### HallsofIvy

That would bother me too! Where have you ever seen such at thing? Yes, the derivative of the function x2 is 2x. The value of that differential function, when x= 10 is 2(10)= 20. You are NOT setting x= 10 in the original function and then taking the derivative, you are taking the derivative of the function and then setting x= 10 in the derivative function. And you cannot say that "dx= 0". dx is only defined for functions, not for numbers- and even then is an abstract concept (unless you want to go into "non-standard analysis" and do the enormous work of actually defining "differentials" as part of an extended number system).

Standard calculus itself, which is not what you wrote here, does a very good job of that. I think you are misunderstanding the basic concept of "derivative" and "differential"

I don't see why you would need to do that.

5. Sep 24, 2008

### Tac-Tics

I will admit I haven't don a whole lot of work in differential equations, so forgive me if I seem a bit clueless.

Let me go through an introductory problem and show you what I mean:

$$\frac{dy}{dx} = (x-1)y^2$$, where $$y(0) = 3$$.

Now, the solution is found by separating the x's and y's onto both sides of the equation to get:

$$\frac{dy}{y^2} = (x-1)dx$$.

This is where my computer-science instincts kick in and tell me something weird is going on.

The derivative is an operation (a function really) which maps real functions to real functions. So if you have a function, y in this case, you can take its derivative, notated as y' or $$\frac{dy}{dx}$$. My issue is with treating dy and dx as individual mathematical objects (instead of treating them together as an awkward notation). What is the nature of dx and dy?

Secondly, it catches my eye that we are being very sloppy with the types of our variables. We have a function y and a real variable x. However, on the right hand side, we multiply a function and a variable together. (And then later, we multiply the result of that by some infinitesimal-but-not-really sort of thing!)

So, let's start off with that much.

EDIT - Note that I got this problem off of an internet site, and I have the solution to it already, being

$$y(x) = \frac{6}{-3x^2+6x+2}$$

6. Sep 24, 2008

### Defennder

There's an explanation of why separation of variable is valid for solving DE... except I can't remember the details. It's in my DE text which I read through last semester. There's something about implicit differentiation if I remember correctly. I'll check it when I get back tonight.

7. Sep 25, 2008

### smallphi

I don't see what the big problem is.

$$\frac{1}{y^2}\frac{dy}{dx} = (x-1)$$

These are two equal functions on both sides of equality. If you integrate them wrt x, the integrals are equal up to integration constant. The integral of x-1 is fine as it is. In the integral of the left side, change the integration variable from x to y, the derivative dy/dx allows you to do that.

When one separates dy/dx into dy and dx on different sides of equality, it's just an intuitive mnemonic. That's how computers compute a numerical solution. The mathematically rigorous way of doing it is what I described above and it has nothing to do with differentials, but with integration.

Last edited: Sep 25, 2008
8. Sep 25, 2008

### Tac-Tics

I think my confusion was just an issue with the notation. Working on the problem a little more, I can see now what is meant by the above equation is this:

$$\frac{1}{y(x)^2}y'(x) = x-1$$

Writing it like this, y is a function, y(x) (the function y with a real argument x applied to it) is real, y'(x) is similarly real. Everything on both sides is real and typechecks correctly. Then, by taking either side to be a function of x, let's call this function g, we can integrate both sides:

$$g(x) = \frac{1}{y(x)^2}y'(x) = x-1$$

$$\int g(x) dx = \int \frac{1}{y(x)^2}y'(x)dx = \int (x-1) dx$$

Which we can integrate by parts and solve for y.

After having worked out the problem using explicit notation, I can see why you can get away with all the little notational quirks =-)

I think I've solved my problem here.

9. Sep 26, 2008

### HallsofIvy

Reminds me of the "Freshman Error" (too) often seen on Calculus tests:

Problem: if f(x)= x2, find f'(2).

Answer: f(2)= 4 and the derivative of 4 is 0: f'(2)= 0!