# Homework Help: Differential Equation - Disappearing Term

1. Oct 16, 2015

### BOAS

Hi,

I am struggling to find the solution to the following equation. I can't account for the exponential term, so clearly something is going wrong...

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

Find the general solution to $x' = tx + 6te^{-t^2}$ where $x(t)$.

2. Relevant equations

3. The attempt at a solution

Consider $x' - tx = 0$

$\frac{dx}{dt} = tx$

$\frac{dx}{t} = t dt$
Mod note: the above should be $\frac{dx}{x} = t dt$
integrating and exponentiating gives $x = Ae^{\int t dt}$. Let $I = \int t dt$

$x = A e^{I}$ and rearranging gives $A = x e^{-I}$

Differentiating yields $A' = x'e^{-I} - t x e^{-I}$

Factoring out the exponential term, and recognising that this is the same as the initial equation.

$A' = e^{-I}(x' - tx) = e^{-I}(6te^{-t^{2}})$

$A = \int e^{-I}(x' - tx) dt = \int e^{-I}(6te^{-t^{2}}) dt$ which simplifies to

$A = \int e^{-\frac{3}{2} t^{2} + c} 6t dt$

Using the substitution $u = - \frac{3}{2} t^{2}$ I find that

$A = - 2 \int e^{u} du = -2e^c e^{- \frac{3}{2} t^{2}} + c$

$x = e^I A = e^{- \frac{1}{2} t^2}(-2 e^{- \frac{3}{2} t^{2}} + c)$

This is not a solution to my differential equation. The $6t e^{-t^2}$ term is nowhere to be seen.

What am I doing wrong?

Last edited by a moderator: Oct 16, 2015
2. Oct 16, 2015

### epenguin

I found easier than going through your arguments, just noticing that differentiating e-t2 gives you something very suggestive for a solution which I got.

3. Oct 16, 2015

### geoffrey159

The steps to solve a first order differential equation of the type $y' + a y = b$, where $a,b$ are continuous, real valued functions, are
1 - Find the general solution $y_0$ of the equation when $b=0$, these are $\{ \lambda e^{-A}, \lambda\in\mathbb{R}, A \text{ primitive of } a \}$
2 - Find a particular solution $y_1$ to the equation. In your case it requires no calculations.
3 - Add these solutions to have the general solution of the equation

4. Oct 16, 2015

### BOAS

Hmm, you are right.

$x = \frac{1}{2} e^{t^{2}} - 3 e^{-t^{2}} + C$

Last edited: Oct 16, 2015
5. Oct 16, 2015

### geoffrey159

Your answer is incomplete because the solution is not unique unless you have a condition such as $x(t_0) = y_0$

6. Oct 16, 2015

### geoffrey159

Still incomplete, even with $+C$ . Read post #3

7. Oct 16, 2015

### Ray Vickson

Your main error is that initially, $x$ was a solution of $x' - tx = 0$. Then you put $x' - tx = 6 t e^{-t^2}$ in your expression for $A'$. That is incorrect: as originally defined, $A$ was a constant, with $A' = 0$, so you cannot just pull a switcheroo and suddenly make $A'$ non-zero, without at least changing the meaning of $A$. Go back to tried-and-true methods, as presented in your textbook or (probably) your course notes.

8. Oct 16, 2015

### epenguin

I don't think that's quite right, it seems to me

x = -2 e-t2 + C

will do it.

Last edited: Oct 16, 2015
9. Oct 16, 2015

### geoffrey159

No, the solutions are the $x_\lambda(t) = -2e^{-t^2} + \lambda e^\frac{t^2}{2}$, $\lambda\in\mathbb{R}$

10. Oct 16, 2015

### epenguin

I only said #2 mine was A solution.

11. Oct 17, 2015

### BOAS

The method I used is the same (I think) as presented in 'Maths Methods For the Physical Sciences' - Mary Boas, on page 346

It claims that $y = e^{-I} \int Q e^{I} dx + C e^{-I}$ is the general solution to a linear first order differential equation of the form $y' + Py = Q$

12. Oct 17, 2015

### BOAS

I appreciate that you have all taken the time to help me here, but I think it's best I go back to square one, as you have highlighted some pretty core misunderstandings.

Thank you for your help.

13. Oct 17, 2015

### vela

Staff Emeritus
The point here is that if you multiply $x' - tx$ by $e^{-I}$, you turn it into the derivative of $x e^{-I}$.

This line would be okay if you didn't say it was equal to A', which is equal to 0 because A is a constant.

You made a sign error. $I$, as you defined it above, is equal to $+\frac{t^2}{2}$, which gives you $x(t) = -2 e^{-t^2} + c e^{t^2/2}$, which is the correct solution.

Note that for the general case you cited above, $I$ is defined as $\int p(x)\,dx$, but the way you did it in this problem, you set $I = -\int p(x)\,dx$. That's why you have the difference in sign.

14. Oct 17, 2015

### geoffrey159

The thing is that you need to be very careful with algebraic manipulations.
For exemple, a division of your original DE by a function that has got one or several zeros in the interval you are interested in will force you to solve your DE in several sub-intervals and reconnect by continuity and differentiability the solutions found at the bounds.
If you can't do these connections, your solution set is $\emptyset$ since your $y$ (or $y'$) is not globally continuous.
But you will never see that if you just divide and integrate.

15. Oct 17, 2015

### BOAS

I have worked through the problem again and arrived at the correct solution.

What I don't understand is why the derivative of the solution is not $= tx + 6t e^{-t^{2}}$, but rather just $tx$

16. Oct 17, 2015

### vela

Staff Emeritus
You must be making a mistake when differentiating. I find $x'(t) = 4 e^{-t^2} + c t e^{t^2/2}$. If you subtract $xt$ from that, you're left with $6te^{-t^2}$ as expected.

17. Oct 17, 2015

### BOAS

You are correct.

I missed the minus sign in my derivative.

Thank you.

18. Oct 17, 2015

### Ray Vickson

I hope she does not actually say that, because as you have written it, it is either (i) wrong; (ii) inaccurate; (iii) misleading, or (iv) error-prone. What IS true is that the solution of $y/ + P y = Q$ has the form
$$y =c e^{-q(t)} + e^{-q(t)} \int_0^t e^{q(s)} Q(s) \, ds = c e^{-q(t)} + \int_0^t e^{q(s) - q(t)} Q(s) \, ds,$$
where $q(t) = \int_0^t Q(s) \, ds$. The correct formula involves specifying function arguments $q(t)$, plus distinguishing between the variable $t$ in the solution $y(t)$ and the integration dummy variable $s$. Just writing $y = e^{-I} \int Q e^{I} dx + C e^{-I}$ leaves way too much to the imagination and leaves way too much room for mistakes, etc.

19. Oct 18, 2015

### BOAS

My mistakes aside, my argument follows fairly closely the steps outlined in the book (see attached).

Could you recommend a more rigorous text? I am concerned that many of the explanations will be of similar calibre.

#### Attached Files:

File size:
33 KB
Views:
65
• ###### avb0ZTZ.jpg
File size:
26.7 KB
Views:
80
20. Oct 18, 2015

### geoffrey159

It is incorrectly explained.
Just an exemple, when she says around (3.3) second scan "We obtain a solution as follows : $\frac{dy}{y} = -P dx$ ...... $\ln(y) = ...$ ".

She doesn't know that $y$ does not cancel at some point on the interval of interest. You know it a posteriori, once you have found $y$.
So she assumes that the solution has no zero without even knowing it, and she uses divisions by $y$ and uses logarithm of $y$ at all points. It is incorrect !

21. Oct 18, 2015

### vela

Staff Emeritus
I think the explanation in the text is fine. Sure, you can get really pedantic and point out that the x in the integral isn't the same as the x outside the integral, or when dividing by y, we must assume y doesn't vanish on the interval of interest, etc., but as one of my professors used to say, one should focus on the donut and not the hole.

22. Oct 18, 2015

### geoffrey159

Why is it pedantic to say that ?

23. Oct 18, 2015

### vela

Staff Emeritus
Because by the time most people are learning about how to solve differential equations, they're well acquainted with the abuse of notation. To keep pointing it out over and over and over is pedantic.

24. Oct 18, 2015

### geoffrey159

Whether what you think is justified or not, I'm not going to teach you that telling directly to people they are pedantic is unfriendly if not rude, am I ?
It iches me to reply but I don't want to spoil this thread with that kind of stuff.

25. Oct 18, 2015

### vela

Staff Emeritus
Please don't take things so personally. I'm not saying anyone is being pedantic. My point is that the author is to explain the reasoning behind where the integrating factor comes from rather than just pulling it out of thin air. Could she have devoted more space to the technical details? Sure, but doing that will tend to clutter up the presentation and detract from what she's trying to accomplish.

I realize this probably makes mathematicians cringe, but the book is, after all, intended for physics students.