Solving an optimization problem involving a differential equation?Simplifying an expression involving a complex logarithmHow to I find $y(t)$ when the flow rate in is $=r$ and concentration of chemical $Y$ coming in is $=X$ grams per liter?How to solve a system of two differential equations describing the concentration in a leaky tank?Linear Systems of Differential Equations - Container Mixing ProblemDifferential equation for the amount of chemical in the pond at any timeA model for constant temperature of water in a containerHow to find concentration of a solution, differential equation problemFormation of differential equation under given conditionsDifferential Equation In Context of A Concentration PuzzleAre unit conversions unnecessary when constructing this differential equation?Create a differential equation and solve for an initial value
What should you do when eye contact makes your subordinate uncomfortable?
Temporarily disable WLAN internet access for children, but allow it for adults
What if a revenant (monster) gains fire resistance?
What is the highest possible scrabble score for placing a single tile
How to explain what's wrong with this application of the chain rule?
How much character growth crosses the line into breaking the character
What is going on with 'gets(stdin)' on the site coderbyte?
Lowest total scrabble score
How to rewrite equation of hyperbola in standard form
Is this toilet slogan correct usage of the English language?
Non-trope happy ending?
Did arcade monitors have same pixel aspect ratio as TV sets?
On a tidally locked planet, would time be quantized?
When were female captains banned from Starfleet?
Does IPv6 have similar concept of network mask?
Can a College of Swords bard use a Blade Flourish option on an opportunity attack provoked by their own Dissonant Whispers spell?
Why is it that I can sometimes guess the next note?
Is there a way to get `mathscr' with lower case letters in pdfLaTeX?
Recommended PCB layout understanding - ADM2572 datasheet
PTIJ: Haman's bad computer
Extract more than nine arguments that occur periodically in a sentence to use in macros in order to typset
How could a planet have erratic days?
Why can Carol Danvers change her suit colours in the first place?
Can I say "fingers" when referring to toes?
Solving an optimization problem involving a differential equation?
Simplifying an expression involving a complex logarithmHow to I find $y(t)$ when the flow rate in is $=r$ and concentration of chemical $Y$ coming in is $=X$ grams per liter?How to solve a system of two differential equations describing the concentration in a leaky tank?Linear Systems of Differential Equations - Container Mixing ProblemDifferential equation for the amount of chemical in the pond at any timeA model for constant temperature of water in a containerHow to find concentration of a solution, differential equation problemFormation of differential equation under given conditionsDifferential Equation In Context of A Concentration PuzzleAre unit conversions unnecessary when constructing this differential equation?Create a differential equation and solve for an initial value
$begingroup$
I am trying to solve what I think is a single variable calculus optimization problem. The actual problem I’m trying to solve is rather hard to describe, but I think it’s isomorphic to this one.
Suppose there are two linked containers, container A and container B. Rain is falling on container A for the next hour, at the rate of $1$ liter per hour. (Rain is not falling on container B.) And water flows from container A to container B at a rate of $r(t) = fracq(t)1-t$, where $q(t)$ is the amount of water currently in container A. Now at any time in the next hour, you can dump out all the water currently in container A (after which rain will continue to fall on container A). But you can only do it once. So what is the best time to do it if you want to minimize the amount of water that ends up in container B at the end of the hour?
I think the basic situation is described by the differential equation $fracdqdt = 1 - r = 1 - fracq(t)1-t$ where $q(0)=0$, whose solution according to Wolfram Alpha is given by $q(t)=(t-1)ln(1-t)$. And if the water in container A is dumped at time $T$, then I think the amount of water in container B at the end of the hour is given by $P(T)= int_0^T r(t) dt + 1 - q(T) = T - 2q(T) +2$. And we want to find the time $T$ between $0$ and $1$ which minimizes $P(T)$.
Yet there must be an error somewhere, because if I plug in $q(t)=(t-1)ln(1-t)$ into the expression for $P(T)$, then for any value of $T$ between $0$ and $1$, it looks like $P(T)>1$. But that makes no sense, because if only $1$ liter of water falls on container A over the course of the hour, there’s no way that there will be more than a liter of water in container B at the end of the hour. So where am I going wrong?
calculus integration ordinary-differential-equations optimization
$endgroup$
add a comment |
$begingroup$
I am trying to solve what I think is a single variable calculus optimization problem. The actual problem I’m trying to solve is rather hard to describe, but I think it’s isomorphic to this one.
Suppose there are two linked containers, container A and container B. Rain is falling on container A for the next hour, at the rate of $1$ liter per hour. (Rain is not falling on container B.) And water flows from container A to container B at a rate of $r(t) = fracq(t)1-t$, where $q(t)$ is the amount of water currently in container A. Now at any time in the next hour, you can dump out all the water currently in container A (after which rain will continue to fall on container A). But you can only do it once. So what is the best time to do it if you want to minimize the amount of water that ends up in container B at the end of the hour?
I think the basic situation is described by the differential equation $fracdqdt = 1 - r = 1 - fracq(t)1-t$ where $q(0)=0$, whose solution according to Wolfram Alpha is given by $q(t)=(t-1)ln(1-t)$. And if the water in container A is dumped at time $T$, then I think the amount of water in container B at the end of the hour is given by $P(T)= int_0^T r(t) dt + 1 - q(T) = T - 2q(T) +2$. And we want to find the time $T$ between $0$ and $1$ which minimizes $P(T)$.
Yet there must be an error somewhere, because if I plug in $q(t)=(t-1)ln(1-t)$ into the expression for $P(T)$, then for any value of $T$ between $0$ and $1$, it looks like $P(T)>1$. But that makes no sense, because if only $1$ liter of water falls on container A over the course of the hour, there’s no way that there will be more than a liter of water in container B at the end of the hour. So where am I going wrong?
calculus integration ordinary-differential-equations optimization
$endgroup$
$begingroup$
Is it true that $A$ has no rain at first?
$endgroup$
– Parcly Taxel
Mar 15 at 3:10
$begingroup$
@ParclyTaxel Yes, it’s initially empty.
$endgroup$
– Keshav Srinivasan
Mar 15 at 3:10
add a comment |
$begingroup$
I am trying to solve what I think is a single variable calculus optimization problem. The actual problem I’m trying to solve is rather hard to describe, but I think it’s isomorphic to this one.
Suppose there are two linked containers, container A and container B. Rain is falling on container A for the next hour, at the rate of $1$ liter per hour. (Rain is not falling on container B.) And water flows from container A to container B at a rate of $r(t) = fracq(t)1-t$, where $q(t)$ is the amount of water currently in container A. Now at any time in the next hour, you can dump out all the water currently in container A (after which rain will continue to fall on container A). But you can only do it once. So what is the best time to do it if you want to minimize the amount of water that ends up in container B at the end of the hour?
I think the basic situation is described by the differential equation $fracdqdt = 1 - r = 1 - fracq(t)1-t$ where $q(0)=0$, whose solution according to Wolfram Alpha is given by $q(t)=(t-1)ln(1-t)$. And if the water in container A is dumped at time $T$, then I think the amount of water in container B at the end of the hour is given by $P(T)= int_0^T r(t) dt + 1 - q(T) = T - 2q(T) +2$. And we want to find the time $T$ between $0$ and $1$ which minimizes $P(T)$.
Yet there must be an error somewhere, because if I plug in $q(t)=(t-1)ln(1-t)$ into the expression for $P(T)$, then for any value of $T$ between $0$ and $1$, it looks like $P(T)>1$. But that makes no sense, because if only $1$ liter of water falls on container A over the course of the hour, there’s no way that there will be more than a liter of water in container B at the end of the hour. So where am I going wrong?
calculus integration ordinary-differential-equations optimization
$endgroup$
I am trying to solve what I think is a single variable calculus optimization problem. The actual problem I’m trying to solve is rather hard to describe, but I think it’s isomorphic to this one.
Suppose there are two linked containers, container A and container B. Rain is falling on container A for the next hour, at the rate of $1$ liter per hour. (Rain is not falling on container B.) And water flows from container A to container B at a rate of $r(t) = fracq(t)1-t$, where $q(t)$ is the amount of water currently in container A. Now at any time in the next hour, you can dump out all the water currently in container A (after which rain will continue to fall on container A). But you can only do it once. So what is the best time to do it if you want to minimize the amount of water that ends up in container B at the end of the hour?
I think the basic situation is described by the differential equation $fracdqdt = 1 - r = 1 - fracq(t)1-t$ where $q(0)=0$, whose solution according to Wolfram Alpha is given by $q(t)=(t-1)ln(1-t)$. And if the water in container A is dumped at time $T$, then I think the amount of water in container B at the end of the hour is given by $P(T)= int_0^T r(t) dt + 1 - q(T) = T - 2q(T) +2$. And we want to find the time $T$ between $0$ and $1$ which minimizes $P(T)$.
Yet there must be an error somewhere, because if I plug in $q(t)=(t-1)ln(1-t)$ into the expression for $P(T)$, then for any value of $T$ between $0$ and $1$, it looks like $P(T)>1$. But that makes no sense, because if only $1$ liter of water falls on container A over the course of the hour, there’s no way that there will be more than a liter of water in container B at the end of the hour. So where am I going wrong?
calculus integration ordinary-differential-equations optimization
calculus integration ordinary-differential-equations optimization
asked Mar 15 at 3:05
Keshav SrinivasanKeshav Srinivasan
2,37221445
2,37221445
$begingroup$
Is it true that $A$ has no rain at first?
$endgroup$
– Parcly Taxel
Mar 15 at 3:10
$begingroup$
@ParclyTaxel Yes, it’s initially empty.
$endgroup$
– Keshav Srinivasan
Mar 15 at 3:10
add a comment |
$begingroup$
Is it true that $A$ has no rain at first?
$endgroup$
– Parcly Taxel
Mar 15 at 3:10
$begingroup$
@ParclyTaxel Yes, it’s initially empty.
$endgroup$
– Keshav Srinivasan
Mar 15 at 3:10
$begingroup$
Is it true that $A$ has no rain at first?
$endgroup$
– Parcly Taxel
Mar 15 at 3:10
$begingroup$
Is it true that $A$ has no rain at first?
$endgroup$
– Parcly Taxel
Mar 15 at 3:10
$begingroup$
@ParclyTaxel Yes, it’s initially empty.
$endgroup$
– Keshav Srinivasan
Mar 15 at 3:10
$begingroup$
@ParclyTaxel Yes, it’s initially empty.
$endgroup$
– Keshav Srinivasan
Mar 15 at 3:10
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
The amount of water in $B$ after time $t$ without any dumps of $A$ is given by another differential equation:
$$fracdBdt=frac A1-t=-ln(1-t)$$
which can be easily solved to yield
$$B=t+(1-t)ln(1-t)$$
Since we dump $A$ once, we are looking for some optimal $t$ such that the following expression is at a minimum:
$$B(t)+B(1-t)=t+(1-t)ln(1-t)+(1-t)+tln t=1+(1-t)ln(1-t)+tln t$$
Its derivative is
$$(1-t)cdotfrac-11-t+(-1)ln(1-t)+tcdotfrac1t+ln t=ln t-ln(1-t)=lnfrac t1-t$$
and this is zero when
$$frac t1-t=1implies t=1-timplies t=frac12$$
So $A$ should be dumped at the halfway mark.
$endgroup$
$begingroup$
@KeshavSrinivasan We can treat this as two separate processes. We let the rain move for a time $t$, so $B$ accumulates $B(t)$ rain, then we dump $A$. This restarts the process from zero and from there $B$ accumulates $B(1-t)$ rain. Thus the total amount of rain in $B$ after one hour is $B(t)+B(1-t)$, where we choose $t$.
$endgroup$
– Parcly Taxel
Mar 15 at 3:37
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
);
);
, "mathjax-editing");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "69"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3148842%2fsolving-an-optimization-problem-involving-a-differential-equation%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
The amount of water in $B$ after time $t$ without any dumps of $A$ is given by another differential equation:
$$fracdBdt=frac A1-t=-ln(1-t)$$
which can be easily solved to yield
$$B=t+(1-t)ln(1-t)$$
Since we dump $A$ once, we are looking for some optimal $t$ such that the following expression is at a minimum:
$$B(t)+B(1-t)=t+(1-t)ln(1-t)+(1-t)+tln t=1+(1-t)ln(1-t)+tln t$$
Its derivative is
$$(1-t)cdotfrac-11-t+(-1)ln(1-t)+tcdotfrac1t+ln t=ln t-ln(1-t)=lnfrac t1-t$$
and this is zero when
$$frac t1-t=1implies t=1-timplies t=frac12$$
So $A$ should be dumped at the halfway mark.
$endgroup$
$begingroup$
@KeshavSrinivasan We can treat this as two separate processes. We let the rain move for a time $t$, so $B$ accumulates $B(t)$ rain, then we dump $A$. This restarts the process from zero and from there $B$ accumulates $B(1-t)$ rain. Thus the total amount of rain in $B$ after one hour is $B(t)+B(1-t)$, where we choose $t$.
$endgroup$
– Parcly Taxel
Mar 15 at 3:37
add a comment |
$begingroup$
The amount of water in $B$ after time $t$ without any dumps of $A$ is given by another differential equation:
$$fracdBdt=frac A1-t=-ln(1-t)$$
which can be easily solved to yield
$$B=t+(1-t)ln(1-t)$$
Since we dump $A$ once, we are looking for some optimal $t$ such that the following expression is at a minimum:
$$B(t)+B(1-t)=t+(1-t)ln(1-t)+(1-t)+tln t=1+(1-t)ln(1-t)+tln t$$
Its derivative is
$$(1-t)cdotfrac-11-t+(-1)ln(1-t)+tcdotfrac1t+ln t=ln t-ln(1-t)=lnfrac t1-t$$
and this is zero when
$$frac t1-t=1implies t=1-timplies t=frac12$$
So $A$ should be dumped at the halfway mark.
$endgroup$
$begingroup$
@KeshavSrinivasan We can treat this as two separate processes. We let the rain move for a time $t$, so $B$ accumulates $B(t)$ rain, then we dump $A$. This restarts the process from zero and from there $B$ accumulates $B(1-t)$ rain. Thus the total amount of rain in $B$ after one hour is $B(t)+B(1-t)$, where we choose $t$.
$endgroup$
– Parcly Taxel
Mar 15 at 3:37
add a comment |
$begingroup$
The amount of water in $B$ after time $t$ without any dumps of $A$ is given by another differential equation:
$$fracdBdt=frac A1-t=-ln(1-t)$$
which can be easily solved to yield
$$B=t+(1-t)ln(1-t)$$
Since we dump $A$ once, we are looking for some optimal $t$ such that the following expression is at a minimum:
$$B(t)+B(1-t)=t+(1-t)ln(1-t)+(1-t)+tln t=1+(1-t)ln(1-t)+tln t$$
Its derivative is
$$(1-t)cdotfrac-11-t+(-1)ln(1-t)+tcdotfrac1t+ln t=ln t-ln(1-t)=lnfrac t1-t$$
and this is zero when
$$frac t1-t=1implies t=1-timplies t=frac12$$
So $A$ should be dumped at the halfway mark.
$endgroup$
The amount of water in $B$ after time $t$ without any dumps of $A$ is given by another differential equation:
$$fracdBdt=frac A1-t=-ln(1-t)$$
which can be easily solved to yield
$$B=t+(1-t)ln(1-t)$$
Since we dump $A$ once, we are looking for some optimal $t$ such that the following expression is at a minimum:
$$B(t)+B(1-t)=t+(1-t)ln(1-t)+(1-t)+tln t=1+(1-t)ln(1-t)+tln t$$
Its derivative is
$$(1-t)cdotfrac-11-t+(-1)ln(1-t)+tcdotfrac1t+ln t=ln t-ln(1-t)=lnfrac t1-t$$
and this is zero when
$$frac t1-t=1implies t=1-timplies t=frac12$$
So $A$ should be dumped at the halfway mark.
answered Mar 15 at 3:28
Parcly TaxelParcly Taxel
44.7k1376109
44.7k1376109
$begingroup$
@KeshavSrinivasan We can treat this as two separate processes. We let the rain move for a time $t$, so $B$ accumulates $B(t)$ rain, then we dump $A$. This restarts the process from zero and from there $B$ accumulates $B(1-t)$ rain. Thus the total amount of rain in $B$ after one hour is $B(t)+B(1-t)$, where we choose $t$.
$endgroup$
– Parcly Taxel
Mar 15 at 3:37
add a comment |
$begingroup$
@KeshavSrinivasan We can treat this as two separate processes. We let the rain move for a time $t$, so $B$ accumulates $B(t)$ rain, then we dump $A$. This restarts the process from zero and from there $B$ accumulates $B(1-t)$ rain. Thus the total amount of rain in $B$ after one hour is $B(t)+B(1-t)$, where we choose $t$.
$endgroup$
– Parcly Taxel
Mar 15 at 3:37
$begingroup$
@KeshavSrinivasan We can treat this as two separate processes. We let the rain move for a time $t$, so $B$ accumulates $B(t)$ rain, then we dump $A$. This restarts the process from zero and from there $B$ accumulates $B(1-t)$ rain. Thus the total amount of rain in $B$ after one hour is $B(t)+B(1-t)$, where we choose $t$.
$endgroup$
– Parcly Taxel
Mar 15 at 3:37
$begingroup$
@KeshavSrinivasan We can treat this as two separate processes. We let the rain move for a time $t$, so $B$ accumulates $B(t)$ rain, then we dump $A$. This restarts the process from zero and from there $B$ accumulates $B(1-t)$ rain. Thus the total amount of rain in $B$ after one hour is $B(t)+B(1-t)$, where we choose $t$.
$endgroup$
– Parcly Taxel
Mar 15 at 3:37
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3148842%2fsolving-an-optimization-problem-involving-a-differential-equation%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
$begingroup$
Is it true that $A$ has no rain at first?
$endgroup$
– Parcly Taxel
Mar 15 at 3:10
$begingroup$
@ParclyTaxel Yes, it’s initially empty.
$endgroup$
– Keshav Srinivasan
Mar 15 at 3:10