# First-order differential equation from Apostol's Calculus (Chapter 8.3, problem 9)

## Homework Statement

Find all solutions of $$(x - 2)(x - 3)y’ + 2y = (x - 1)(x - 2)$$ on each of the following intervals: $$(a) (-\infty, 2); (b) (2, 3); (c) (3, +\infty).$$

## Homework Equations

$$f(x) = be^{-A(x)} + e^{-A(x)} \int_a^x \! Q(t)e^{A(t)}dt$$

## The Attempt at a Solution

I chose a = 1, first concentrating on a point in interval (a). Using that, I arrived to the solution $$f(x) = 4b (\frac{x-2}{x-3})^{2} + \frac{(x-2)(x-1)^{2}}{(x-3)^{2}},$$which is basically the same as what WolframAlpha gives you, namely $$f(x) = c_{1} e^{-2(\log(3-x)-\log(2-x))} + \frac{(x-2)(x-1)^{2}}{(x-3)^{2}}.$$The only difference I see is that their solution is general, and Apostol seems to not use the integration constant, but rather operates with b, as in f(a) = b. I'd say that's just a matter of style, though.

What I don't see here is why and how there would be different solutions for the different intervals (a), (b) and (c). As long as the function is defined there, shouldn't they all be the same? And the function is defined there, I think, it's just that WolframAlpha forgot to put absolute values in natural logs. Also, for a, plugging in values from intervals (b) and (c) just gives you a different constant, but that's it, so I'm really puzzled by this one.

Thanks in advance for any help.

Last edited:

Related Calculus and Beyond Homework Help News on Phys.org
hunt_mat
Homework Helper

have you done this from first principles? It's an integrating factor method equation.

have you done this from first principles?
What do you mean by that?
It's an integrating factor method equation.
This is also something that I hear for the first time.

This problem is given after the first section of the Introduction to Differential Equations chapter, and since none of the terms you've used were introduced, I'm a bit puzzled by what exactly you mean.

I hate to do this, but bump. I was hoping to get back to some self-studying over the long weekend, so any further help would be appreciated.

hunt_mat
Homework Helper

For an equation of the form:
$$\frac{dy}{dx}+p(x)y=q(x)$$
The generic trick is to write the LHS as a total derivative, in order to do this multiply throughout by:
$$e^{\int p(x)dx}$$
To get:
$$e^{\int p(x)dx}\frac{dy}{dx}+e^{\int p(x)dx}p(x)y=e^{\int p(x)dx}q(x)$$
Now you can recognise the LHS as a total derivative:
$$e^{\int p(x)dx}\frac{dy}{dx}+e^{\int p(x)dx}p(x)y=\frac{d}{dx}\left (e^{\int p(x)dx}y\right)$$
and so the differential equation becomes:
$$\frac{d}{dx}\left (e^{\int p(x)dx}y\right) =e^{\int p(x)dx}q(x)$$
Now this can be integrated quite easily. What are the function p(x) and q(x) for your case?

$$\frac{d}{dx}\left (e^{\int p(x)dx}y\right) =e^{\int p(x)dx}q(x)$$
Now this can be integrated quite easily. What are the function p(x) and q(x) for your case?
In my case, $$p(x) = \frac{2}{(x-3)(x-2)},$$ and $$q(x) = \frac{x-1}{x-3}.$$ But then following your last equation, I think I get the same result for f(x) as I've already posted in my original post, don't I?

hunt_mat
Homework Helper

Go through it slowly, integrate p(x) and then take the exponential, what do you get?

Go through it slowly, integrate p(x) and then take the exponential, what do you get?
OK, so $$\int p(x)dx = 2 \ln\frac{x-3}{x-2} + C,$$ so that the left-hand side of the equation after integrating is $$(\frac{x-3}{x-2})^{2}y.$$On the other hand, the right-hand side of the equation is now $$\int \frac{(x-3)(x-1)}{(x-2)^{2}},$$ so that after integrating we get $$\frac{(x-1)^{2}}{x-2} + C.$$Solving for y, we get $$y = c (\frac{x-2}{x-3})^{2} + \frac{(x-2)(x-1)^{2}}{(x-3)^{2}},$$ which is exactly what I got for f(x) in my original post. I don't get it, are you getting a different solution? Because I can get to here, I just don't know what to do with different intervals.

hunt_mat
Homework Helper

Now at least you know the general method for solving such equations. As I can see from the solution, the solution is well defined for $x\in (-\infty ,3)$. For x<2, the solution is negative and for 2<x<3, the solution is positive.

Now at least you know the general method for solving such equations. As I can see from the solution, the solution is well defined for $x\in (-\infty ,3)$. For x<2, the solution is negative and for 2<x<3, the solution is positive.
What about the third interval $x\in (3, +\infty),$ why would it not be well defined there? And when you say the solution is negative or positive, wouldn't that also depend on the constant c? Or why would all solutions have to be negative on $x\in (-\infty ,2)?$

hunt_mat
Homework Helper

You're quite correct, the sign of y does depend on the sign of c. You can say for certain that the solution is zero at x=2 and is infinite at x=3, these were most likely the reason that the points were chosen. What can you say about the solution for x>3? (I left that one fo you to tell me about.

Since we only have squared terms involving (x - 3), it seems it is the same as for 2 < x < 3, and that it diverges as x goes to infinity. Is there anything else one can say?