Confusion with simple differential equation

Galenus

New member
Joined
Jul 6, 2019
Messages
9
While solving differential equations I noticed that I repeatedly made one specific error which can best be demonstrated with this simple example:

[math]y' = 1-y[/math]
Seperation of variables:

[math]\frac{dy}{1-y} = dx[/math]
[math]\implies \int \frac{dy}{1-y} = \int dx[/math]
u-sub with [imath]u = y -1[/imath] for the left integral gives

[math]\log{|1-y|} = -x + C[/math]
Now here is where I made my error, when taking the exponential function of both sides, this gives

[imath]y-1=\tilde{C}e^{-x} \space [/imath] and NOT [imath] \space 1-y=\tilde{C}e^{-x}[/imath]

I understand we need the absolute value sign for the argument of log so we don't take the log of a negative number. But how does the absolute value vanish when taking the exponential function? And then - why do we need to switch from [imath]\log{|1-y|}[/imath] to [imath]\log{|y-1|}[/imath] ?
 
Last edited:
While solving differential equations I noticed that I repeatedly made one specific error which can best be demonstrated with this simple example:

[math]y' = 1-y[/math]
Seperation of variables:

[math]\frac{dy}{1-y} = dx[/math]
[math]\implies \int \frac{dy}{1-y} = \int dx[/math]
u-sub with [imath]u = y -1[/imath] for the left integral gives

[math]\log{|1-y|} = -x + C[/math]
Now here is where I made my error, when taking the exponential function of both sides, this gives

[imath]y-1=\tilde{C}e^{-x} \space [/imath] and NOT [imath] \space 1-y=\tilde{C}e^{-x}[/imath]

I understand we need the absolute value sign for the argument of log so we don't take the log of a negative number. But how does the absolute value vanish when taking the exponential function? And then - why do we need to switch from [imath]\log{|1-y|}[/imath] to [imath]\log{|y-1|}[/imath] ?
Why do you think one of those choices was right and the other was wrong? Are you just comparing to someone's answer, or is there some other reason? Because there is really no difference between them.

Did you notice that your [imath]\tilde{C}[/imath] could be either positive or negative? The sign will be determined by an initial value (or other information); and the only difference between the two answers you show is that sign. The absolute value is, you might say, vanishing into that sign.

As an intermediate step to make that clear, I would have gone from

[imath]\log{|1-y|} = -x + C[/imath]​

to

[imath]|1-y| = e^{-x + C}[/imath]​

to

[imath]1-y = \pm e^{-x + C} = \pm e^Ce^{-x}[/imath].​

Your only error is in not being aware of what you were doing.
 
Thanks for your reply, of course!

I got very confused because my teaching assistant marked it wrong on my solution. I attached one example (it's in german but the math is clear).

The result was [math]y(x) = -\frac{1-Cx^2}{1+Cx^2}[/math]
But replacing [imath]C[/imath] with [imath]-\tilde{C}[/imath] this becomes [imath]y(x) = -\frac{1+\tilde{C}x^2}{1-\tilde{C}x^2} = \frac{\tilde{C}x^2+1}{\tilde{C}x^2-1}[/imath].
Therefore, the solutions are equivalent.

So I assume that my TA messed it up.
 

Attachments

  • ta.JPG
    ta.JPG
    59.5 KB · Views: 5
Thanks for your reply, of course!

I got very confused because my teaching assistant marked it wrong on my solution. I attached one example (it's in german but the math is clear).

The result was [math]y(x) = -\frac{1-Cx^2}{1+Cx^2}[/math]
But replacing [imath]C[/imath] with [imath]-\tilde{C}[/imath] this becomes [imath]y(x) = -\frac{1+\tilde{C}x^2}{1-\tilde{C}x^2} = \frac{\tilde{C}x^2+1}{\tilde{C}x^2-1}[/imath].
Therefore, the solutions are equivalent.

So I assume that my TA messed it up.
I think you're right; they probably compared your work and solution to their own and didn't see that it was equivalent.

Possibly if you told me what was written in red (I could probably manage to read German, but not scribbles) there might be some explanation, but I don't expect it.

Did the original problem say anything more, such as the allowed values of y?

Wolfram Alpha gives a solution closer to yours!
 
I think you're right; they probably compared your work and solution to their own and didn't see that it was equivalent.

Possibly if you told me what was written in red (I could probably manage to read German, but not scribbles) there might be some explanation, but I don't expect it.

Did the original problem say anything more, such as the allowed values of y?

Wolfram Alpha gives a solution closer to yours!
In red it says "implizite Substitution mit negativer Funktionaldeterminante". Translated that would probably be "implicit substitution with negative jacobian determinant."

I somewhat know the jacobian determinant, it is used when calculating volume-integrals. No idea how it is related to this case though. Seems very mysterious to me ...
 
In red it says "implizite Substitution mit negativer Funktionaldeterminante". Translated that would probably be "implicit substitution with negative jacobian determinant."

I somewhat know the jacobian determinant, it is used when calculating volume-integrals. No idea how it is related to this case though. Seems very mysterious to me ...
You could think of the simple substitution you did as a one-dimensional application of the Jacobian; perhaps they are looking at the problem from that perspective. But I don't see how that would necessarily change what is substituted.

It seems to me that they chose to rewrite the integrand as -1/(y-1) first, rather than make the substitution u = 1-y as you evidently did (like Jomo's approach in post #5). And they may have thought that u = y-1 was the only reasonable choice, without considering that your way wasn't wrong. But, again, this would not be forced by viewing the differential as a Jacobian.
 
Top