1. ## integrating query

\displaystyle \begin{align*}(1+x^2)\frac{dy}{dx}&=x(1-y)\\\int \frac{dy}{1-y}&=\int \frac{xdx}{1+x^2}\\-ln(1-y)&=\frac{1}{2}\ln(1+x^2)+c\end{align*}

I saw this working recently and I was hoping someone might be able to help me to understand/accept it better.
It is the integrating that is upsetting me because one side is integrated with respect to x and the other with respect to y.
why is this allowed?

2. ## Re: integrating query

$\displaystyle \frac{\text{dy} \left(x^2+1\right)}{\text{dx}}=x (1-y)$

$\displaystyle \text{dy} \left(x^2+1\right)= x (1-y) \text{dx}$

$\displaystyle \frac{\text{dy}}{1-y}=\frac{x \text{dx}}{x^2+1}$

$\displaystyle \int \frac{1}{1-y} \, dy=\int \frac{x}{x^2+1} \, dx$

The first integral should be obviously -ln(1-y)

For the second you need to make the substitution u = 1+x2 and note that du = 2x dx, it should be obvious how to proceed from there.

3. ## Re: integrating query

thanks Romsek, but I think that you have missed my point.
I know how it is done but I don't know why I am allowed to do it.

4. ## Re: integrating query

they are just dummy variables. You know this because of the dy and dx. Is there any difference between

$\displaystyle \int \frac{1}{1-y} \, dy$ and $\displaystyle \int \frac{1}{1-x} \, dx$ ?

any difference would show up in the limits of integration. With no limits of integration explicitly stated sure you would go ahead and say that the first integral is an antiderivative in y and the second an antiderivative in x but that's not really correct, it's just a shorthand, and even then x and y are just dummy vars for the antiderivative function.

Maybe one of the hard math guys can give you a better answer. I'm more of an engineering math guy.

5. ## Re: integrating query

Okay thanks Romsek, that at least gives me something to think about I'm still not sure that I am convinced, but the idea is growing on me.

6. ## Re: integrating query

Unless you are really interested, it's best if you simply accept that if

$\displaystyle M + N \frac{dy}{dx}= 0,$ then

$\displaystyle Mdx+Ndy=0$

and that you can simply put an integral sign in front of each expression.

That is,

$\displaystyle \int Mdx + \int N dy = 0,$ or

$\displaystyle \int Ndy = -\int Mdx.$

If you are really interested then you should read up on things called $\displaystyle \textbf{differentials}.$

As to your equation, the left and right hand sides can be considered separately, that is, you could ask what the RHS is equal to without any reference to the LHS and vice versa. They're sort of stand alone problems.

7. ## Re: integrating query

Hello, Melody2!

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

. . $\displaystyle \int \frac{dy}{1-y}\:=\:\int \frac{x\,dx}{1+x^2}$

$\displaystyle -\ln(1-y) \:=\:\tfrac{1}{2}\ln(1+x^2)+C$

I saw this working recently and I was hoping someone might be able to help me to understand/accept it.
It is the integrating that is upsetting me, because one side is integrated with respect to x
and the other with respect to y. .Why is this allowed?

Why?
Suppose we have two integrals: .$\displaystyle \begin{Bmatrix} I &=& \displaystyle\int 2y\,dy \\ J &=& \displaystyle \int 3x^2\,dx\end{Bmatrix}$

Would you agree that: .$\displaystyle \begin{Bmatrix}I &=& y^2+C_1 \\ J &=& x^3+C_2 \end{Bmatrix}\.?$

Suppose they told us that $\displaystyle I \,=\,J.$

Can't we write: .$\displaystyle y^2+C_1 \:=\:x^3+C_2 \quad\Rightarrow\quad y^2 \:=\:x^3 + C\;?$

8. ## Re: integrating query

Hi Melody,

Suppose I were to say: "let f(x) be a function". This is really an abuse of notation. Given a function f with some domain D, f(x) is the value of f at the element x of D. So by "let f(x) be a function" really means: let f be a function defined by f(x) = blah blah blah (the domain D is either explicitly given or "implied").

Now given a function f, an antiderivative of f is a function F such that the derivative of F, namely F', satisfies F'(x)=f(x) for all x in the domain of f; same thing F'(z) = f(z) for any z. The accepted notation for any antiderivative of f is
$\displaystyle \int f(x)\,dx$

Now to your specific question about differential equations. Let f and g be known functions with y an unknown function. The DE is of the form

$\displaystyle f(y){dy\over dx}=g(x)$

What this really means is

$\displaystyle f(y(x))y\prime(x)=g(x)$ for all x (in some domain D).

Now let F and G be antiderivatives of f and g respectively; i.e. F'(y) = f(y) and G'(x) = g(x) for all appropriate y and x. Now what is the derivative of the composition of F with the unknown function y?. Well, by the chain rule, this derivative F(y(x))' = F'(y(x))y'(x) or f(y(x))y'(x). But f, y and g satisfy

$\displaystyle f(y(x))y\prime(x)=g(x)$

That is, the antiderivative F composed with y has derivative the same as the derivative of G. That is,

$\displaystyle \int f(y)\,dy = \int f(x)\,dx$

Here, though, the antiderivative on the left must be interpreted as being composed with the unknown function y.

Example DE:

$\displaystyle (1+x^2){dy\over dx}=x(1-y)$ or $\displaystyle {1\over 1-y}{dy\over dx}={x\over x^2+1}$

Let $\displaystyle f(y)={1\over 1-y}$ and $\displaystyle g(x)={x\over x^2+1}$

You "integrate both sides" to obtain:

$\displaystyle -\ln(1-y)={1\over2}\ln(x^2+1)}+C$

This last equation must be interpreted as

$\displaystyle -\ln(1-y(x))={1\over2}\ln(x^2+1)}+C$ with y the unknown function.

Of course, this last equation can be solved for y(x) to get

$\displaystyle y(x)=K(x^2+1)^{-1/2}+1$ Here $\displaystyle K=e^{-C}$

9. ## Re: integrating query

Originally Posted by Melody2
\displaystyle \begin{align*}(1+x^2)\frac{dy}{dx}&=x(1-y)\\\int \frac{dy}{1-y}&=\int \frac{xdx}{1+x^2}\\-ln(1-y)&=\frac{1}{2}\ln(1+x^2)+c\end{align*}

I saw this working recently and I was hoping someone might be able to help me to understand/accept it better.
It is the integrating that is upsetting me because one side is integrated with respect to x and the other with respect to y.
why is this allowed?

This is a technique known as "Separation of Variables", which is an entirely valid technique, despite how sloppy the working out given is. The idea is to use the Chain Rule in reverse (which you might know as integration by substitution) to simplify one of the integrands. You might remember that to use a substitution, you need to find an "inner" function (which we usually call \displaystyle \displaystyle \begin{align*} u \end{align*} ) and this inner function's derivative \displaystyle \displaystyle \begin{align*} \frac{du}{dx} \end{align*} needs to be a factor in the integrand. So something like \displaystyle \displaystyle \begin{align*} \int{f\left( u(x) \right) \cdot \frac{du}{dx} \, dx} \end{align*}. By substituting the function u, then this becomes \displaystyle \displaystyle \begin{align*} \int{ f\left( u(x) \right) \cdot \frac{du}{dx} \, dx } = \int{ f(u)\,du} \end{align*} and then perform the integration with respect to \displaystyle \displaystyle \begin{align*} u \end{align*}.

This is exactly what happens when separating variables in a DE. Notice that \displaystyle \displaystyle \begin{align*} y \end{align*} is a function of \displaystyle \displaystyle \begin{align*} x \end{align*}, and the equation is written in terms of the derivative of y as well (obviously as it's a differential equation). This means that essentially both sides are a function of x, and because it's an equation, each side is equal to the other, and so the integrals of both sides have to be equal as well. So in your case

\displaystyle \displaystyle \begin{align*} \left( 1 + x^2 \right) \frac{dy}{dx} &= x \left( 1 - y \right) \\ \left( \frac{1}{1 - y} \right) \frac{dy}{dx} &= \frac{x}{1 + x^2} \\ \int{ \left( \frac{1}{1 - y} \right) \frac{dy}{dx} \, dx } &= \int{ \frac{x}{1 + x^2} \, dx} \textrm{ upon integrating both sides with respect to }x \\ \int{ \frac{1}{1 - y} \, dy} &= \int{ \frac{x}{1+ x^2} \, dx} \textrm{ when the Chain Rule simplifies the LHS the same way as a substitution.} \end{align*}

and then it's a case of integrating both sides with respect to the variable given.

10. ## Re: integrating query

Thank you to all of you. Those answers are great!
They have really helped me.