How can I solve a separable differential equation for an initial value problem?

Click For Summary

Homework Help Overview

The discussion revolves around solving an initial value problem involving a separable differential equation, specifically dx/dt = x(2-x) with the initial condition x(0) = 1. Participants are exploring the integration process and the implications of the initial condition on the solution.

Discussion Character

  • Exploratory, Mathematical reasoning, Assumption checking

Approaches and Questions Raised

  • Participants discuss the integration of the separable differential equation and the handling of constants of integration. There are attempts to simplify the logarithmic expressions and questions about the correctness of the steps taken, particularly regarding the manipulation of logarithms and constants.

Discussion Status

Some participants have provided guidance on correctly applying the initial conditions and evaluating constants. There is an ongoing exploration of different interpretations of the integration results and how they relate to the initial condition. Multiple lines of reasoning are being examined without a clear consensus on the final approach.

Contextual Notes

Participants note the importance of the initial condition in determining the constants in the solution. There is also a discussion about the potential pitfalls in manipulating logarithmic expressions and the need for careful evaluation of constants during integration.

cwbullivant
Messages
60
Reaction score
0

Homework Statement



Solve the initial value problem:

dx/dt = x(2-x) x(0) = 1

Homework Equations



Problem statement.

The Attempt at a Solution



Based on the format, I attempted to solve the problem as a separable differential equation:

∫dx/(x[2-x]) = ∫dt

Evaluating to:

(ln|x|)/2 - (ln|2 - x|)/2 + C = t + C

Simplifying

ln|x| - ln|2 - x| + 2C = 2t + 2C

Cancelling the constant

ln|x| - ln|2 - x| = 2t

Removing the logs

x - (2 - x) = e^2t

Simplifying further

2x - 2 = e^2t

And finally solving for x:

(e^2t)/2 + 1

Which gives me a function, but for t = 0, x(0) = 3/2, not 1.

Should I be using another technique, or did I make a mistake somewhere in the process above?
 
Physics news on Phys.org
The reason you are given initial conditions so that you can evaluate the constant, so it shouldn't disappear. I didn't check the integration but instead write :$$\ln|x| - \ln|2-x| + K = 2t + 2C\,\,\,\text{and so} \ln|x| -\ln|2-x| = 2t + D$$ where D = 2C - K. Now evaluate D using initial conditions.
 
CAF123 said:
The reason you are given initial conditions so that you can evaluate the constant, so it shouldn't disappear. I didn't check the integration but instead write :$$\ln|x| - \ln|2-x| + K = 2t + 2C\,\,\,\text{and so} \ln|x| -\ln|2-x| = 2t + D$$ where D = 2C - K. Now evaluate D using initial conditions.

Attempting to evaluate using

$$ln|x| -\ln|2-x| = 2t + D$$

Returns

$$x = e^{2t+D} + 1$$

Hmmm... Perhaps resubstituting so that...

$$x = e^{2t}e^{D} + 1$$

And assuming e^D = some constant A

$$x = Ae^{2t} + 1$$

Which looks similar to the equation for radioactive decay.

But that only seems to satisfy the initial condition for A = 0, and while that does seem like a potential solution, it also implies that $$x(t) = Ae^{2t} + 1 = 1 \forall t $$ (sorry for bad formatting with the last bit, this is the first time I've ever actually used latex), which seems like it will be a problem.
 
cwbullivant said:
Attempting to evaluate using

$$ln|x| -\ln|2-x| = 2t + D$$
Yes, that's correct.

Returns

$$x = e^{2t+D} + 1$$
How in the world did you get this?

Hmmm... Perhaps resubstituting so that...

$$x = e^{2t}e^{D} + 1$$

And assuming e^D = some constant A

$$x = Ae^{2t} + 1$$

Which looks similar to the equation for radioactive decay.

But that only seems to satisfy the initial condition for A = 0, and while that does seem like a potential solution, it also implies that $$x(t) = Ae^{2t} + 1 = 1 \forall t $$ (sorry for bad formatting with the last bit, this is the first time I've ever actually used latex), which seems like it will be a problem.
 
cwbullivant said:

Homework Statement



Solve the initial value problem:

dx/dt = x(2-x) x(0) = 1

Homework Equations



Problem statement.

The Attempt at a Solution



Based on the format, I attempted to solve the problem as a separable differential equation:

∫dx/(x[2-x]) = ∫dt

Evaluating to:

(ln|x|)/2 - (ln|2 - x|)/2 + C = t + C

Simplifying

ln|x| - ln|2 - x| + 2C = 2t + 2C

Cancelling the constant

ln|x| - ln|2 - x| = 2t
The two constants of integration aren't necessarily equal, so you can't cancel them like you did. You usually combine them anyway, so typically, you just include the constant on one side of the equation after integrating.
$$\int \frac{dx}{x(2-x)} = \int dt \hspace{2em} \Rightarrow \hspace{2em} \frac{1}{2}\ln \lvert x \rvert - \frac{1}{2}\ln \lvert 2-x \rvert = t+C$$
Removing the logs

x - (2 - x) = e^2t
This is wrong. ##e^{\ln a + \ln b} \ne a+b##. You need to review how to work with logarithms.

Simplifying further

2x - 2 = e^2t

And finally solving for x:

(e^2t)/2 + 1

Which gives me a function, but for t = 0, x(0) = 3/2, not 1.

Should I be using another technique, or did I make a mistake somewhere in the process above?
 
vela said:
The two constants of integration aren't necessarily equal, so you can't cancel them like you did. You usually combine them anyway, so typically, you just include the constant on one side of the equation after integrating.
$$\int \frac{dx}{x(2-x)} = \int dt \hspace{2em} \Rightarrow \hspace{2em} \frac{1}{2}\ln \lvert x \rvert - \frac{1}{2}\ln \lvert 2-x \rvert = t+C$$

This is wrong. ##e^{\ln a + \ln b} \ne a+b##. You need to review how to work with logarithms.

##e^{\ln a + \ln b} = ab## and ##e^{\ln a - \ln b} = \frac{a}{b}##correct?

In which case,

$$ \frac{x}{2-x} = e^{2t}e^{D} $$

Is this on the right track?
 
Yup. So now apply the initial condition and solve for D. Note that ##e^D## is a constant, so you can write the righthand side as ##Ke^{2t}## and solve for K instead.
 
Last edited:
vela said:
Yup. So now apply the initial condition and solve for D. Note that ##e^D## is a constant, so you can write the righthand side as ##Ke^{2t}## and solve for K instead.

Ok. So $$ \frac{x}{2-x} = e^{2t}e^{D} $$, and calling $$e^D = K$$

## \frac{x}{2-x} = Ke^{2t}##, applying initial condition x(0) = 1, t = 0

## Ke^{0} = 1 ##

Given e^0 = 1, K = 1?
 
You have a solution, so you don't need us to verify it for you. If your equation satisfies the initial condition and the differential equation, you're done.
 

Similar threads

Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
Replies
5
Views
2K
  • · Replies 15 ·
Replies
15
Views
2K
  • · Replies 5 ·
Replies
5
Views
1K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 11 ·
Replies
11
Views
3K
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
2
Views
1K