Unraveling an ODE: Solving a First Order Equation with Separation of Variables

  • Thread starter Thread starter Augustine Duran
  • Start date Start date
  • Tags Tags
    First order Ode
Augustine Duran
Messages
39
Reaction score
1

Homework Statement


Solve: ##\frac {dx} {dt}## ##\text{= 8-3x , x(0)=4}##

The Attempt at a Solution



Step 1:
##\int \frac 1 {8-3x} \, dx## = ##\int \, dt##

Step 2:
- ##\frac 1 3## ##\text{ln|8-3x| = t+c}##

From here I am going to try to get it into explicit form

Step 3:
##\text{ln|8-3x| = -3t-3c}##

Step 4:
##e^{ln|8-3x|}## = ##e^{-3t-3c}##

Step 5:
##\text{|8-3x|}## = ##e^{-3t-3c}##

im not sure what to do about the absolute values. I was thinking of cheating and just dropping them and then just solving for x which would give me

Step 6:
##\text{x= }## ##\frac 1 3####\text{(8-}####e^{-3t-3c}####\text{)}##

Plug in initial conditions x(0) = 4

Step 7:
##\text{4= }## ##\frac 1 3####\text{(8-}####e^{-3(0)-3c}####\text{)}##

Step 8: Simplify
##\text{4}##=-##e^{-3c}##

The problem here is that if i take the ln of both sides to solve for C it will be undefined because of the negative sign. Probably dropping the absolute signs in step 6 without a reason is a no no but I am not sure what to do.

Any help would be appreciated.
 
Physics news on Phys.org
Augustine Duran said:

Homework Statement


Solve: ##\frac {dx} {dt}## ##\text{= 8-3x , x(0)=4}##

The Attempt at a Solution



Step 1:
##\int \frac 1 {8-3x} \, dx## = ##\int \, dt##

Step 2:
- ##\frac 1 3## ##\text{ln|8-3x| = t+c}##

From here I am going to try to get it into explicit form

Step 3:
##\text{ln|8-3x| = -3t-3c}##

Step 4:
##e^{ln|8-3x|}## = ##e^{-3t-3c}##

Step 5:
##\text{|8-3x|}## = ##e^{-3t-3c}##

im not sure what to do about the absolute values. I was thinking of cheating and just dropping them
What does the absolute value mean? What is |8-3x| if 3x<8 and when 3x>8? Note that you have different c-s in both cases.
You are given the initial condition, which means that 3x>8.
 
  • Like
Likes Augustine Duran
x(t) =
\begin{cases}
3x-8 & \text{if } x > \frac 8 3 \\
8-3x & \text{if } x \leq \frac 8 3
\end{cases}

okay so seeing that my initial conditions give me x=4 i will be using 3x-8 since 4 is larger than 8/3?

##\text{3x-8 =}####e^{-3t-3c}##

##\text{x =}####\frac 1 3####\text{(8+}####e^{-3t-3c}####\text{)}##

##\text{4 =}####\frac 1 3####\text{(8+}####e^{-3(0)-3c}####\text{)}##

##\text{12 = 8+}####e^{-3c}##

simplify

-##\frac {ln4} 3##=##\text{C}##

is this correct?
 
Augustine Duran said:
x(t) =
\begin{cases}
3x-8 & \text{if } x > \frac 8 3 \\
8-3x & \text{if } x \leq \frac 8 3
\end{cases}

okay so seeing that my initial conditions give me x=4 i will be using 3x-8 since 4 is larger than 8/3?

##\text{3x-8 =}####e^{-3t-3c}##

##\text{x =}####\frac 1 3####\text{(8+}####e^{-3t-3c}####\text{)}##

##\text{4 =}####\frac 1 3####\text{(8+}####e^{-3(0)-3c}####\text{)}##

##\text{12 = 8+}####e^{-3c}##

simplify

-##\frac {ln4} 3##=##\text{C}##

is this correct?

Correct so far; go ahead. What is x(t)?
 
plugging in C and simplifying i get

##\text{x=}####\frac 8 3####\text{+}####\frac 4 3####e^{-3t}##
 
Of course, if you aren't required to use separation of variables, it is much easier to write it as ##x' + 3x = 8## and use the linear equation method of integrating factor. That avoids all the fuss with the absolute value signs and logarithms.
 
Thread 'Use greedy vertex coloring algorithm to prove the upper bound of χ'
Hi! I am struggling with the exercise I mentioned under "Homework statement". The exercise is about a specific "greedy vertex coloring algorithm". One definition (which matches what my book uses) can be found here: https://people.cs.uchicago.edu/~laci/HANDOUTS/greedycoloring.pdf Here is also a screenshot of the relevant parts of the linked PDF, i.e. the def. of the algorithm: Sadly I don't have much to show as far as a solution attempt goes, as I am stuck on how to proceed. I thought...
Back
Top