Setting up and solving for ODE

  • Thread starter hotcommodity
  • Start date
  • Tags
    Ode
In summary, setting up and solving for an ODE to find the amount of salt in a 5 gallon bucket after 1 minute yielded the following:0.238 lbs.
  • #1
hotcommodity
436
0
[SOLVED] Setting up and solving for ODE

Homework Statement



A 5 gallon bucket is full of pure water. Suppose we begin dumping salt into the bucket at a rate of .25 lbs per minute. Also, we open the spigot so that .5 gallons per minute leaves the bucket, and we add pure water to keep the bucket full. If the salt water solution is always well mixed, what is the amount of salt in the bucket after 1 minute?


Homework Equations



If I call the rate of salt flowing in [tex] \frac{dI}{dt} [/tex] then [tex] \frac{dI}{dt}= \frac{.25 lb salt}{min} [/tex]

If I call the rate of solution flowing out [tex] \frac{dO}{dt} [/tex] then [tex] \frac{dO}{dt}= \frac{0.5 gal solution}{min} [/tex]

The concentraion as the amount of salt at any time t divided by the amount of pure water is [tex] \frac{S(t)}{5gal} [/tex]. Multiplying dO/dt by the concentration gives [tex] \frac{dO}{dt} = \frac{0.1S}{min}[/tex].


The Attempt at a Solution



I figure [tex] \frac{dS}{dt} = \frac{dI}{dt} - \frac{dO}{dt} [/tex]

and thus [tex] \frac{dS}{dt} = .25 - 0.1(S) [/tex]

I won't type out the rest until I know that I'm on track. Is this correct reasoning?

Any help is appreciated.
 
Last edited:
Physics news on Phys.org
  • #2
I think you are on the right track, yes.
 
  • #3
Mathdope said:
I think you are on the right track, yes.

Ok then. I have:

[tex] \frac{dS}{dt} = .25 - 0.1(S) = 0.1( 2.5 - S) [/tex]

I separate variables (really only S) and integrate:

[tex] \int \frac{dS}{2.5 - S} = \int 0.1 dt [/tex]

[tex] ln|2.5 - S| = 0.1t + C_1 [/tex]

[tex] 2.5 - S = \pm e^{0.1t}e^{C_1} [/tex]

[tex] 2.5 - S = C_2e^{0.1t} [/tex]

[tex] S(t) = 2.5 + C_3e^{0.1t} [/tex]

If there is 0 salt at t = 0, then C3 = 2.5, and I have

[tex] S(t) = 2.5 + 2.5e^{0.1t} [/tex]

However, this is incorrect.
 
  • #4
hotcommodity said:
If there is 0 salt at t = 0, then C3 = 2.5, and I have

[tex] S(t) = 2.5 + 2.5e^{0.1t} [/tex]

However, this is incorrect.
C3 would be -2.5 not 2.5
 
  • #5
But at 1 min, that would give me a negative answer.
 
  • #6
It's possible that the problem lies in the fact that you're derivative measuring rate in is in terms of salt (with no water), while the derivative measuring rate out is in terms of the salt solution (with the water).

If they are adding pure water to keep the bucket full, you may need to recheck what you put for dI/dt.

Edit: No , now that I look again, it does look like both rates are measuring that of the salt only. Hmmm. I'll keep looking.
 
  • #7
OK thanks, I appreciate the help.

Edit: If it helps at all the answer is 0.238 lbs.
 
Last edited:
  • #8
Try factoring out a -0.1 instead of a 0.1 when you are setting up the differential equation. It shouldn't matter (!) but it will give you a negative exponential instead of a positive. I have to go eat but I'll be back in a half hour or so to see if that helps. Maybe someone else will see the problem too.

Edit: see below. It does matter. That's your problem right there, as "explained" below.
 
Last edited:
  • #9
hotcommodity said:
Ok then. I have:

[tex] \frac{dS}{dt} = .25 - 0.1(S) = 0.1( 2.5 - S) [/tex]

I separate variables (really only S) and integrate:

[tex] \int \frac{dS}{2.5 - S} = \int 0.1 dt [/tex]

[tex] ln|2.5 - S| = 0.1t + C_1 [/tex]
It is not the case that d/dS(ln|2.5 - S|)=1/[2.5 - S], so your antiderivative is a bit off (not much). Can you see why?
 
Last edited:
  • #10
Mathdope said:
It is not the case that d/dS(ln|2.5 - S|)=1/[2.5 - S], so you're antiderivative is a bit off (not much). Can you see why?

I believe I should have used u-substitution while integrating. If I had done so, I would have:

[tex] - ln|2.5 - S| = 0.1t + C_1 [/tex]

[tex] -|2.5 - S| = e^{0.1t}e^{C_1} [/tex]

[tex] -(2.5 - S) = \pm e^{0.1t}e^{C_1} [/tex]

[tex] S - 2.5 = C_2e^{0.1t} [/tex]

[tex] S(t) = C_2e^{0.1t} + 2.5 [/tex]

When S(t) is 0, C2 must be -2.5.

[tex] S(t) = 2.5 - 2.5e^{0.1t} [/tex]

This is pretty much what I had before, I'm not sure what I'm doing wrong.
 
  • #11
hotcommodity said:
I believe I should have used u-substitution while integrating. If I had done so, I would have:

[tex] - ln|2.5 - S| = 0.1t + C_1 [/tex]

[tex] -|2.5 - S| = e^{0.1t}e^{C_1} [/tex]

This is pretty much what I had before, I'm not sure what I'm doing wrong.
Your mistake is going from the first line to second on the left hand side. In other words
[tex] - ln|2.5 - S| [/tex] doesn't become [tex] -|2.5 - S| [/tex] when exponentiating. Try it once more.
 
  • #12
Ok I got it, I needed to place the negative on the other side of the equation. So I have:

[tex] S(t) = 2.5 - 2.5e^{-0.1t} [/tex]

And I get the correct answer. Thank you very much for your help :)
 
  • #13
Aye that's it. You're welcome. You can now mark the thread solved.
 
Last edited:

What is an ODE?

An ODE, or Ordinary Differential Equation, is a mathematical equation that describes how a variable changes over time. It involves derivatives, which represent the rate of change of the variable.

Why do we need to set up and solve ODEs?

ODEs are useful in modeling real-world situations where the variable changes over time. By setting up and solving ODEs, we can make predictions and analyze the behavior of these systems.

What are the steps for setting up and solving an ODE?

The first step is to determine the independent variable and the dependent variable. Then, we need to write the ODE in its standard form, which typically involves isolating the highest order derivative. Next, we need to choose an appropriate method for solving the ODE, such as separation of variables or using an integrating factor. Finally, we solve the ODE and check our solution for accuracy.

What are some common methods for solving ODEs?

Some common methods for solving ODEs include separation of variables, integrating factor, substitution, and power series. The specific method used depends on the type of ODE and its initial/boundary conditions.

How can we use ODEs in real-world applications?

ODEs are used in a variety of fields, such as physics, chemistry, biology, economics, and engineering. They can be used to model population growth, chemical reactions, motion of objects, and many other phenomena. By solving ODEs, we can make predictions and gain insights into these systems.

Similar threads

  • Calculus and Beyond Homework Help
Replies
3
Views
2K
  • Calculus and Beyond Homework Help
Replies
3
Views
3K
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
3K
  • Calculus and Beyond Homework Help
Replies
6
Views
4K
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
2K
  • Calculus and Beyond Homework Help
Replies
5
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
5K
  • Calculus and Beyond Homework Help
Replies
1
Views
2K
Back
Top