# Diff Eqs: can't get a reasonable answer

Tags:
1. Jul 17, 2015

### kostoglotov

1. The problem statement, all variables and given/known data

Imgur link: http://i.imgur.com/C1epJzI.png

My issues arise in part (b) but cause me to doubt my solution to part (a) as well.

2. Relevant equations

3. The attempt at a solution

$$\frac{dx}{dt} = k(a-x)(b-x)$$

$$\int \frac{1}{(a-x)(b-x)} dx = k \int dt$$

Use partial fraction decomposition on LHS

$$\frac{1}{(a-x)(b-x)} = \frac{A}{a-x}+\frac{B}{b-x}$$

$$A(b-x) + B(a-x) = 1$$

Let x = b

$$B(a-b) = 1 \ \ B = \frac{1}{a-b}$$

Let x = a

$$A(b-a) = 1 \ \ A = \frac{1}{b-a} = \frac{-1}{a-b}$$

$$\int \frac{1}{(a-x)(b-x)} dx = \int \frac{1}{(a-b)(b-x))} - \frac{1}{(a-b)(a-x)} dx$$

$$= \frac{1}{a-b} \left[ -\ln{|b-x|} + \ln{|a-x|} \right] = \frac{1}{a-b} \ln{\frac{|a-x|}{|b-x|}} = k(t+C)$$

$$\ln{\frac{|a-x|}{|b-x|}} = (a-b)k(t+C)$$

$$\frac{|a-x|}{|b-x|} = e^{(a-b)kC}e^{(a-b)kt}$$

Now let's skip a few steps and get

$$\frac{a-x}{b-x} = Ke^{(a-b)kt}$$

already here I can see problems with part (b), as when a = b, $\frac{a-x}{b-x} = K$

But if we carry on with some algebra from the last step I arrive at

$$x(t) = \frac{bKe^{(a-b)kt}-a}{Ke^{(a-b)kt}-1}$$

and if x(0) = 0 then

$$K = \frac{a}{b}$$

and then

$$x(t) = \frac{a(e^{(a-b)kt}-1)}{\frac{a}{b}e^{(a-b)kt}-1}$$

Now, if a = b x(t) = 0...

Where have I gone wrong?

edit: or is my answer to part (a) correct, and I need to return to the very beginning of the sequence and assume a = b in order to solve (b), thus, the solution to part (a) only holding for the condition that $a \neq b$?

2. Jul 17, 2015

### fzero

I didn't go through all of the algebra, but your solution to (a) looks ok. If $a=b$, the partial fraction decomposition is not valid, but you can instead integrate $1/(a-x)^2$ directly. The solution will have a different functional form involving a reciprocal of $t$ rather than an exponential function.

3. Jul 17, 2015

### kostoglotov

Thanks, I'm still trying to get an intuitive handle on diff eqs. That's why I was getting frustrated. Because my technical skills in everything required in this problem are fine, so not being able to find a mistake, I thought maybe I'd missed something big at the beginning...which it turns out I did I guess.

Domains become really important to consider when modelling with diff eqs then right?

4. Jul 18, 2015

### Ray Vickson

You have gone wrong putting $a = b$ in your $x(t)$ formula because you will have the dreaded (and illegal) form $0/0$. Either you need to put $a = b$ before solving the DE, or else you need to look at $\lim_{b \to a} x(t)$ after you have solved it. When you do it the latter way you do not get $x(t) = 0$.

Last edited: Jul 18, 2015
5. Jul 18, 2015

### DeldotB

Kostoglotov,
I have arrived at your same solution. Partial fractions are still valid since we are asssuming a does not equal b in part a. Try letting a=b and integrating just using a substitution for part b. It wouldn't make sense to let a=b with the equation just derived since x(t)= 0 for all t.

Edit: Ahh Ray beat me to the punch. I second that, re do from the beginning letting a=b

6. Jul 18, 2015

### epenguin

If you go back to your equations for A and B you already see it's trouble if a = b.

In fact no one would ask you to expand 1/(x - a)2 as a partial fraction - there is no way to make it identical to any constant divided by (x - a).

7. Jul 18, 2015

### Zondrina

The domain is always important. Consider the homogeneous Cauchy-Euler equation:

$$ax^2y'' + bxy' + cy = 0$$

In standard form:

$$y'' + \frac{b}{a x} y' + \frac{c}{a x^2}y = 0$$

$x = 0$ would be a regular singular point because the solution may be undefined at $x = 0$. We would then need to seek solutions for $x > 0$ and $x < 0$ individually.

To derive a solution $\forall x \neq 0$, then the absolute value would be required.

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted