Imposing boundary condition and normalization on an ODE

Clash Royale CLAN TAG#URR8PPP
up vote
4
down vote
favorite
I want to use DSolve to solve a differential equation while imposing a boundary condition and normalization.
How can I do that?
Let's take for example a simple heat-equation: $y''[x]=a y[x]$.
Easy to solve:
DSolve[y''[x] == a y[x], y[x], x]
I can also impose a no-flux condition at position L, $nabla rho|_L=0$
DSolve[y''[x] == a y[x], y'[L] == 0, y[x], x]
but I cannot (or don't know how to) impose a normalization condition, $int_0^Lrho(x)dx=1$
DSolve[y''[x] == a y[x], y'[L] == 0, Integrate[y[x], x, 0, L] == 1,
When I evaluate the above expression, I obtain the following error:
There are fewer dependent variables than equations, so the system is overdetermined"
But that is something I can do by hand. What is the problem? Is it a bug or am I misunderstanding something?
differential-equations boundary-conditions
New contributor
user134414 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
up vote
4
down vote
favorite
I want to use DSolve to solve a differential equation while imposing a boundary condition and normalization.
How can I do that?
Let's take for example a simple heat-equation: $y''[x]=a y[x]$.
Easy to solve:
DSolve[y''[x] == a y[x], y[x], x]
I can also impose a no-flux condition at position L, $nabla rho|_L=0$
DSolve[y''[x] == a y[x], y'[L] == 0, y[x], x]
but I cannot (or don't know how to) impose a normalization condition, $int_0^Lrho(x)dx=1$
DSolve[y''[x] == a y[x], y'[L] == 0, Integrate[y[x], x, 0, L] == 1,
When I evaluate the above expression, I obtain the following error:
There are fewer dependent variables than equations, so the system is overdetermined"
But that is something I can do by hand. What is the problem? Is it a bug or am I misunderstanding something?
differential-equations boundary-conditions
New contributor
user134414 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
up vote
4
down vote
favorite
up vote
4
down vote
favorite
I want to use DSolve to solve a differential equation while imposing a boundary condition and normalization.
How can I do that?
Let's take for example a simple heat-equation: $y''[x]=a y[x]$.
Easy to solve:
DSolve[y''[x] == a y[x], y[x], x]
I can also impose a no-flux condition at position L, $nabla rho|_L=0$
DSolve[y''[x] == a y[x], y'[L] == 0, y[x], x]
but I cannot (or don't know how to) impose a normalization condition, $int_0^Lrho(x)dx=1$
DSolve[y''[x] == a y[x], y'[L] == 0, Integrate[y[x], x, 0, L] == 1,
When I evaluate the above expression, I obtain the following error:
There are fewer dependent variables than equations, so the system is overdetermined"
But that is something I can do by hand. What is the problem? Is it a bug or am I misunderstanding something?
differential-equations boundary-conditions
New contributor
user134414 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I want to use DSolve to solve a differential equation while imposing a boundary condition and normalization.
How can I do that?
Let's take for example a simple heat-equation: $y''[x]=a y[x]$.
Easy to solve:
DSolve[y''[x] == a y[x], y[x], x]
I can also impose a no-flux condition at position L, $nabla rho|_L=0$
DSolve[y''[x] == a y[x], y'[L] == 0, y[x], x]
but I cannot (or don't know how to) impose a normalization condition, $int_0^Lrho(x)dx=1$
DSolve[y''[x] == a y[x], y'[L] == 0, Integrate[y[x], x, 0, L] == 1,
When I evaluate the above expression, I obtain the following error:
There are fewer dependent variables than equations, so the system is overdetermined"
But that is something I can do by hand. What is the problem? Is it a bug or am I misunderstanding something?
differential-equations boundary-conditions
differential-equations boundary-conditions
New contributor
user134414 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
user134414 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited 1 hour ago
m_goldberg
83.2k870191
83.2k870191
New contributor
user134414 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 1 hour ago
user134414
211
211
New contributor
user134414 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
user134414 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
user134414 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
5
down vote
You can solve your problem by introducing a second ode (defining the antiderivative):
sol =
DSolve[y''[x] == a y[x], Y'[x] == y[x], y'[L] == 0, Y[L] == 1, y, Y, x][[1]]
y ->
Function[x,
(E^(-Sqrt[a] x) (E^(2 Sqrt[a] L) + E^(2 Sqrt[a] x)) C[1])/(1 + E^(2 Sqrt[a] L))],
Y ->
Function[x,
(E^(-Sqrt[a] x)
(Sqrt[a] E^(Sqrt[a] x) +Sqrt[a] E^(2 Sqrt[a] L + Sqrt[a] x) -
E^(2 Sqrt[a] L) C[1] + E^(2 Sqrt[a] x) C[1])) /
(Sqrt[a] (1 + E^(2 Sqrt[a] L)))]
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
5
down vote
You can solve your problem by introducing a second ode (defining the antiderivative):
sol =
DSolve[y''[x] == a y[x], Y'[x] == y[x], y'[L] == 0, Y[L] == 1, y, Y, x][[1]]
y ->
Function[x,
(E^(-Sqrt[a] x) (E^(2 Sqrt[a] L) + E^(2 Sqrt[a] x)) C[1])/(1 + E^(2 Sqrt[a] L))],
Y ->
Function[x,
(E^(-Sqrt[a] x)
(Sqrt[a] E^(Sqrt[a] x) +Sqrt[a] E^(2 Sqrt[a] L + Sqrt[a] x) -
E^(2 Sqrt[a] L) C[1] + E^(2 Sqrt[a] x) C[1])) /
(Sqrt[a] (1 + E^(2 Sqrt[a] L)))]
add a comment |Â
up vote
5
down vote
You can solve your problem by introducing a second ode (defining the antiderivative):
sol =
DSolve[y''[x] == a y[x], Y'[x] == y[x], y'[L] == 0, Y[L] == 1, y, Y, x][[1]]
y ->
Function[x,
(E^(-Sqrt[a] x) (E^(2 Sqrt[a] L) + E^(2 Sqrt[a] x)) C[1])/(1 + E^(2 Sqrt[a] L))],
Y ->
Function[x,
(E^(-Sqrt[a] x)
(Sqrt[a] E^(Sqrt[a] x) +Sqrt[a] E^(2 Sqrt[a] L + Sqrt[a] x) -
E^(2 Sqrt[a] L) C[1] + E^(2 Sqrt[a] x) C[1])) /
(Sqrt[a] (1 + E^(2 Sqrt[a] L)))]
add a comment |Â
up vote
5
down vote
up vote
5
down vote
You can solve your problem by introducing a second ode (defining the antiderivative):
sol =
DSolve[y''[x] == a y[x], Y'[x] == y[x], y'[L] == 0, Y[L] == 1, y, Y, x][[1]]
y ->
Function[x,
(E^(-Sqrt[a] x) (E^(2 Sqrt[a] L) + E^(2 Sqrt[a] x)) C[1])/(1 + E^(2 Sqrt[a] L))],
Y ->
Function[x,
(E^(-Sqrt[a] x)
(Sqrt[a] E^(Sqrt[a] x) +Sqrt[a] E^(2 Sqrt[a] L + Sqrt[a] x) -
E^(2 Sqrt[a] L) C[1] + E^(2 Sqrt[a] x) C[1])) /
(Sqrt[a] (1 + E^(2 Sqrt[a] L)))]
You can solve your problem by introducing a second ode (defining the antiderivative):
sol =
DSolve[y''[x] == a y[x], Y'[x] == y[x], y'[L] == 0, Y[L] == 1, y, Y, x][[1]]
y ->
Function[x,
(E^(-Sqrt[a] x) (E^(2 Sqrt[a] L) + E^(2 Sqrt[a] x)) C[1])/(1 + E^(2 Sqrt[a] L))],
Y ->
Function[x,
(E^(-Sqrt[a] x)
(Sqrt[a] E^(Sqrt[a] x) +Sqrt[a] E^(2 Sqrt[a] L + Sqrt[a] x) -
E^(2 Sqrt[a] L) C[1] + E^(2 Sqrt[a] x) C[1])) /
(Sqrt[a] (1 + E^(2 Sqrt[a] L)))]
edited 26 mins ago
m_goldberg
83.2k870191
83.2k870191
answered 1 hour ago
Ulrich Neumann
5,330413
5,330413
add a comment |Â
add a comment |Â
user134414 is a new contributor. Be nice, and check out our Code of Conduct.
user134414 is a new contributor. Be nice, and check out our Code of Conduct.
user134414 is a new contributor. Be nice, and check out our Code of Conduct.
user134414 is a new contributor. Be nice, and check out our Code of Conduct.
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f184459%2fimposing-boundary-condition-and-normalization-on-an-ode%23new-answer', 'question_page');
);
Post as a guest
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
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
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
