Solving differential equation that includes an (extra) unknown function
up vote
0
down vote
favorite
I am trying to find a solution for $C_a(t)$ in the below differential equation:
$$
V cdot frac {dC_a(t)} {dt}=R(t)-Q_v cdot C_a(t) \
$$
$
text{Where} \
qquad V text{ is the volume of the test chamber } [m^3] \
qquad C_a text{ is the concentration in test chamber } Big[frac{kg}{m^3} Big] \
qquad R text{ is the non-constant emission rate from test sample } Big[frac{kg}{m^2 cdot s} Big] \
qquad Q_v text{ is the constant volume flow rate of ventilation air passing through the test chamber } Big[frac{m^3}{s} Big] \
$
The non-constant emission rate is the "unknown function" mentioned in the question title. Stating that the function that governs emission rate is unknown is somewhat inaccurate as I have a vector containing values for emission for every examined time t.
Besides knowing values for $R$ at given times $t$, we know that $Ca(0) = 0$ and that $R(0) = 0$.
I am in the process of writing a small Matlab script, and therefore I am hoping to find a solution on a form that allows implementation and evaluation at given points in time (corresponding to the values in known vector $R$).
I have already given it my best, and I have arrived at the below expression (that I sincerely hope is correct). However, this expression considers $R(x)$ as a continuous function and will not be implemented easily.
$$
C_a(t) = exp(-Q_v t V^{-1}) int_{0}^{t}
exp(-Q_v x V^{-1}) R(x) V^{^-1} dx, quad for C_a(0)=0
$$
Can anybody help me find a simpler (explicit and fully analytical) solution for $C_a(t,R(t))$ that is easy to implement?
differential-equations matlab
add a comment |
up vote
0
down vote
favorite
I am trying to find a solution for $C_a(t)$ in the below differential equation:
$$
V cdot frac {dC_a(t)} {dt}=R(t)-Q_v cdot C_a(t) \
$$
$
text{Where} \
qquad V text{ is the volume of the test chamber } [m^3] \
qquad C_a text{ is the concentration in test chamber } Big[frac{kg}{m^3} Big] \
qquad R text{ is the non-constant emission rate from test sample } Big[frac{kg}{m^2 cdot s} Big] \
qquad Q_v text{ is the constant volume flow rate of ventilation air passing through the test chamber } Big[frac{m^3}{s} Big] \
$
The non-constant emission rate is the "unknown function" mentioned in the question title. Stating that the function that governs emission rate is unknown is somewhat inaccurate as I have a vector containing values for emission for every examined time t.
Besides knowing values for $R$ at given times $t$, we know that $Ca(0) = 0$ and that $R(0) = 0$.
I am in the process of writing a small Matlab script, and therefore I am hoping to find a solution on a form that allows implementation and evaluation at given points in time (corresponding to the values in known vector $R$).
I have already given it my best, and I have arrived at the below expression (that I sincerely hope is correct). However, this expression considers $R(x)$ as a continuous function and will not be implemented easily.
$$
C_a(t) = exp(-Q_v t V^{-1}) int_{0}^{t}
exp(-Q_v x V^{-1}) R(x) V^{^-1} dx, quad for C_a(0)=0
$$
Can anybody help me find a simpler (explicit and fully analytical) solution for $C_a(t,R(t))$ that is easy to implement?
differential-equations matlab
If $R$ is only given at discrete times then you will probably need to write your own finite difference code, or else use some suitable interpolant of the data in the analytical solution.
– Ian
Nov 19 at 1:16
By the way, in general when asking a question, it's best to strip down your problem as much as you possibly can without omitting information that is needed to answer the question. In this situation, your problem can be stripped down to $y'(t)=ay(t)+f(t)$ where $a$ is a constant and $f(t)$ is a function which is "really" continuous but is nevertheless only known only at discrete times.
– Ian
Nov 19 at 1:17
Noted. And I do see your point. Thank you for your input.
– Christopher
Nov 19 at 23:47
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am trying to find a solution for $C_a(t)$ in the below differential equation:
$$
V cdot frac {dC_a(t)} {dt}=R(t)-Q_v cdot C_a(t) \
$$
$
text{Where} \
qquad V text{ is the volume of the test chamber } [m^3] \
qquad C_a text{ is the concentration in test chamber } Big[frac{kg}{m^3} Big] \
qquad R text{ is the non-constant emission rate from test sample } Big[frac{kg}{m^2 cdot s} Big] \
qquad Q_v text{ is the constant volume flow rate of ventilation air passing through the test chamber } Big[frac{m^3}{s} Big] \
$
The non-constant emission rate is the "unknown function" mentioned in the question title. Stating that the function that governs emission rate is unknown is somewhat inaccurate as I have a vector containing values for emission for every examined time t.
Besides knowing values for $R$ at given times $t$, we know that $Ca(0) = 0$ and that $R(0) = 0$.
I am in the process of writing a small Matlab script, and therefore I am hoping to find a solution on a form that allows implementation and evaluation at given points in time (corresponding to the values in known vector $R$).
I have already given it my best, and I have arrived at the below expression (that I sincerely hope is correct). However, this expression considers $R(x)$ as a continuous function and will not be implemented easily.
$$
C_a(t) = exp(-Q_v t V^{-1}) int_{0}^{t}
exp(-Q_v x V^{-1}) R(x) V^{^-1} dx, quad for C_a(0)=0
$$
Can anybody help me find a simpler (explicit and fully analytical) solution for $C_a(t,R(t))$ that is easy to implement?
differential-equations matlab
I am trying to find a solution for $C_a(t)$ in the below differential equation:
$$
V cdot frac {dC_a(t)} {dt}=R(t)-Q_v cdot C_a(t) \
$$
$
text{Where} \
qquad V text{ is the volume of the test chamber } [m^3] \
qquad C_a text{ is the concentration in test chamber } Big[frac{kg}{m^3} Big] \
qquad R text{ is the non-constant emission rate from test sample } Big[frac{kg}{m^2 cdot s} Big] \
qquad Q_v text{ is the constant volume flow rate of ventilation air passing through the test chamber } Big[frac{m^3}{s} Big] \
$
The non-constant emission rate is the "unknown function" mentioned in the question title. Stating that the function that governs emission rate is unknown is somewhat inaccurate as I have a vector containing values for emission for every examined time t.
Besides knowing values for $R$ at given times $t$, we know that $Ca(0) = 0$ and that $R(0) = 0$.
I am in the process of writing a small Matlab script, and therefore I am hoping to find a solution on a form that allows implementation and evaluation at given points in time (corresponding to the values in known vector $R$).
I have already given it my best, and I have arrived at the below expression (that I sincerely hope is correct). However, this expression considers $R(x)$ as a continuous function and will not be implemented easily.
$$
C_a(t) = exp(-Q_v t V^{-1}) int_{0}^{t}
exp(-Q_v x V^{-1}) R(x) V^{^-1} dx, quad for C_a(0)=0
$$
Can anybody help me find a simpler (explicit and fully analytical) solution for $C_a(t,R(t))$ that is easy to implement?
differential-equations matlab
differential-equations matlab
asked Nov 19 at 1:09
Christopher
11
11
If $R$ is only given at discrete times then you will probably need to write your own finite difference code, or else use some suitable interpolant of the data in the analytical solution.
– Ian
Nov 19 at 1:16
By the way, in general when asking a question, it's best to strip down your problem as much as you possibly can without omitting information that is needed to answer the question. In this situation, your problem can be stripped down to $y'(t)=ay(t)+f(t)$ where $a$ is a constant and $f(t)$ is a function which is "really" continuous but is nevertheless only known only at discrete times.
– Ian
Nov 19 at 1:17
Noted. And I do see your point. Thank you for your input.
– Christopher
Nov 19 at 23:47
add a comment |
If $R$ is only given at discrete times then you will probably need to write your own finite difference code, or else use some suitable interpolant of the data in the analytical solution.
– Ian
Nov 19 at 1:16
By the way, in general when asking a question, it's best to strip down your problem as much as you possibly can without omitting information that is needed to answer the question. In this situation, your problem can be stripped down to $y'(t)=ay(t)+f(t)$ where $a$ is a constant and $f(t)$ is a function which is "really" continuous but is nevertheless only known only at discrete times.
– Ian
Nov 19 at 1:17
Noted. And I do see your point. Thank you for your input.
– Christopher
Nov 19 at 23:47
If $R$ is only given at discrete times then you will probably need to write your own finite difference code, or else use some suitable interpolant of the data in the analytical solution.
– Ian
Nov 19 at 1:16
If $R$ is only given at discrete times then you will probably need to write your own finite difference code, or else use some suitable interpolant of the data in the analytical solution.
– Ian
Nov 19 at 1:16
By the way, in general when asking a question, it's best to strip down your problem as much as you possibly can without omitting information that is needed to answer the question. In this situation, your problem can be stripped down to $y'(t)=ay(t)+f(t)$ where $a$ is a constant and $f(t)$ is a function which is "really" continuous but is nevertheless only known only at discrete times.
– Ian
Nov 19 at 1:17
By the way, in general when asking a question, it's best to strip down your problem as much as you possibly can without omitting information that is needed to answer the question. In this situation, your problem can be stripped down to $y'(t)=ay(t)+f(t)$ where $a$ is a constant and $f(t)$ is a function which is "really" continuous but is nevertheless only known only at discrete times.
– Ian
Nov 19 at 1:17
Noted. And I do see your point. Thank you for your input.
– Christopher
Nov 19 at 23:47
Noted. And I do see your point. Thank you for your input.
– Christopher
Nov 19 at 23:47
add a comment |
2 Answers
2
active
oldest
votes
up vote
0
down vote
The solution with initial value $C_a(0) = C_0$ is
$$C_a(t) = exp(-Q_v t/V) left( C_0 + int_0^t exp(Q_v s/V) frac{R(s)}{V}; ds right) $$
You can approximate the integral with Riemann sums.
Thank you, Robert, Riemann sums were a a good suggestion!
– Christopher
Nov 19 at 23:41
add a comment |
up vote
0
down vote
accepted
Turns out that Matlab does have a function that allows for solving ODEs with time dependent terms.
Thank you all very much for your time and help.
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
The solution with initial value $C_a(0) = C_0$ is
$$C_a(t) = exp(-Q_v t/V) left( C_0 + int_0^t exp(Q_v s/V) frac{R(s)}{V}; ds right) $$
You can approximate the integral with Riemann sums.
Thank you, Robert, Riemann sums were a a good suggestion!
– Christopher
Nov 19 at 23:41
add a comment |
up vote
0
down vote
The solution with initial value $C_a(0) = C_0$ is
$$C_a(t) = exp(-Q_v t/V) left( C_0 + int_0^t exp(Q_v s/V) frac{R(s)}{V}; ds right) $$
You can approximate the integral with Riemann sums.
Thank you, Robert, Riemann sums were a a good suggestion!
– Christopher
Nov 19 at 23:41
add a comment |
up vote
0
down vote
up vote
0
down vote
The solution with initial value $C_a(0) = C_0$ is
$$C_a(t) = exp(-Q_v t/V) left( C_0 + int_0^t exp(Q_v s/V) frac{R(s)}{V}; ds right) $$
You can approximate the integral with Riemann sums.
The solution with initial value $C_a(0) = C_0$ is
$$C_a(t) = exp(-Q_v t/V) left( C_0 + int_0^t exp(Q_v s/V) frac{R(s)}{V}; ds right) $$
You can approximate the integral with Riemann sums.
answered Nov 19 at 1:44
Robert Israel
314k23206453
314k23206453
Thank you, Robert, Riemann sums were a a good suggestion!
– Christopher
Nov 19 at 23:41
add a comment |
Thank you, Robert, Riemann sums were a a good suggestion!
– Christopher
Nov 19 at 23:41
Thank you, Robert, Riemann sums were a a good suggestion!
– Christopher
Nov 19 at 23:41
Thank you, Robert, Riemann sums were a a good suggestion!
– Christopher
Nov 19 at 23:41
add a comment |
up vote
0
down vote
accepted
Turns out that Matlab does have a function that allows for solving ODEs with time dependent terms.
Thank you all very much for your time and help.
add a comment |
up vote
0
down vote
accepted
Turns out that Matlab does have a function that allows for solving ODEs with time dependent terms.
Thank you all very much for your time and help.
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
Turns out that Matlab does have a function that allows for solving ODEs with time dependent terms.
Thank you all very much for your time and help.
Turns out that Matlab does have a function that allows for solving ODEs with time dependent terms.
Thank you all very much for your time and help.
answered Nov 19 at 23:45
Christopher
11
11
add a comment |
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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.
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%2f3004379%2fsolving-differential-equation-that-includes-an-extra-unknown-function%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
If $R$ is only given at discrete times then you will probably need to write your own finite difference code, or else use some suitable interpolant of the data in the analytical solution.
– Ian
Nov 19 at 1:16
By the way, in general when asking a question, it's best to strip down your problem as much as you possibly can without omitting information that is needed to answer the question. In this situation, your problem can be stripped down to $y'(t)=ay(t)+f(t)$ where $a$ is a constant and $f(t)$ is a function which is "really" continuous but is nevertheless only known only at discrete times.
– Ian
Nov 19 at 1:17
Noted. And I do see your point. Thank you for your input.
– Christopher
Nov 19 at 23:47