Thread: Differential Equations question

  1. #1
    Cheesy Poofs! PJYelton's Avatar
    Join Date
    Sep 2002
    Location
    Boulder
    Posts
    1,728

    Differential Equations question

    I just started a new class that has Differential Equations as a prerequisite, so as a refresher our teacher gave us a little assignment (not for credit so asking this wouldn't be cheating)that had many calc and DE's refresher questions. But its been a few years since I took the DE's class and one of the questions is screwing me up... anyone know if I am doing this right?

    The question: dx/dt + 3x = 0, x(0)=2, x(t)=?

    Okay, if memory serves, the first thing to do is get the dx and dt on separate sides and then integrate.

    dx/dt=-3x

    dt=(-1/3)dx

    Integrating... t=(-1/3) ln(x) + C

    Plugging in the values above to solve for C... 2=(-1/3) ln (0) + C

    But the natural log of zero is undefined, so I know that I am doing something wrong... any help?

  2. #2
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    x(0)=2 -> x=2 when t=0
    The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.

  3. #3
    Cheesy Poofs! PJYelton's Avatar
    Join Date
    Sep 2002
    Location
    Boulder
    Posts
    1,728
    Ahhh... so then

    -3t + C = ln(x)

    e^(-3t) + C = x

    e^(0) + C = 2

    C=1

    x(t) = e^(-3t) + 1

    Thanks!

  4. #4
    Registered User sean345's Avatar
    Join Date
    Mar 2002
    Posts
    346
    >dt=(-1/3)dx
    >Integrating... t=(-1/3) ln(x) + C
    Wouldn't it become:
    t=(-1/3)x + C
    -> X=-3t + C

    <edit>
    I see now. That first line I quoted should have an X with 3.

    - Sean
    If cities were built like software is built, the first woodpecker to come along would level civilization.
    Black Frog Studios

  5. #5
    Cheesy Poofs! PJYelton's Avatar
    Join Date
    Sep 2002
    Location
    Boulder
    Posts
    1,728
    Oops, you're right, tis a typo.

    Change

    dt=(-1/3)dx

    to

    dt=(-1/3x)dx

  6. #6
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    Originally posted by PJYelton
    Ahhh... so then

    -3t + C = ln(x)

    e^(-3t) + C = x

    e^(0) + C = 2

    C=1

    x(t) = e^(-3t) + 1

    Thanks!
    Err... not quite. Its not a solution to dx/dt=-3x. Here (note, I'm sloppy with the 'C' because I'm not looking for a particular form of it).

    dx/dt = -3x

    (-1/3)(dx/x) = dt

    dx/x = -3dt

    ln x = -3t + C

    x = e^(-3t+C)

    x = Ce^(-3t) [The sloppiness I mentioned]

    2 = Ce^0

    C = 2

    x(t) = 2e^(-3t)
    The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.

  7. #7
    Cheesy Poofs! PJYelton's Avatar
    Join Date
    Sep 2002
    Location
    Boulder
    Posts
    1,728
    Jeez I feel like an idiot For some reason I thought:

    e^(-3t+C)=e^(-3t)+e^(C) instead of e^(-3t)*e^(C)

    which of course is wrong... Can you tell its been a few years since I've done anything like this?

    You're right, the answer should be 2e^(-3t), thanks!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. differential equation??
    By kypronite in forum Game Programming
    Replies: 11
    Last Post: 09-03-2008, 05:25 PM
  2. Alice....
    By Lurker in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 06-20-2005, 02:51 PM
  3. Debugging question
    By o_0 in forum C Programming
    Replies: 9
    Last Post: 10-10-2004, 05:51 PM
  4. Differential Equations - I need Help
    By KneeGrow in forum A Brief History of Cprogramming.com
    Replies: 9
    Last Post: 03-28-2004, 11:30 PM
  5. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 09:47 PM