APDE Help: Partial Differential Equations for Scientists and Engineers: Lesson 7 Question 3
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
can someone help by checking my working and perhaps explain where i'm going wrong?
solve the following problem with insulated boundaries
$$textPDE: ~u_t=u_xx$$
$$ textBCs: ~u_x(0,1) = 0~&~ u_x(1,t)=0$$
$$ textIC: ~u(x,0)=x$$
we start with solving the PDE by substituting
$$u(x,t)=X(x)T(t)$$
into the above
this gives
$$u(x,t) = sum_n=1^infty A_n e^(-npi)^2tcosnpi x$$
where $$A_n = 2 int_0^1 xcosnpi x$$
then i make $$A_n = 2* left[ fracxsinn pi xn pi|_0^1 - fraccosn pi xn^2 pi^2 |_0^1right] = -fraccosn pi - 1n^2 pi^2 = frac1-(-1)^nn^2 pi^2$$
which alternates between 0 and 2 so letting $n = 2k+1$
$$A_k = frac4(2k+1)^2 pi^2$$
substituting back in and changing the index gives
$$u(x,t) = A_0 + sum_k=1^infty frac4(2k+1)^2 pi^2 e^(-(2k+1)pi)^2tcos(2k+1)pi x$$
$$u(x,t) = frac4pi^2 + frac4pi^2sum_k=1^infty frace^-((2k+1)pi)^2t(2k+1)^2cos(2k+1)pi x $$
which is different from their solution of
$$u(x,t) = frac12 - frac4pi^2 sum_n=1^infty frac1n^2e^-(npi)^2t cosnpi x$$
any ideas where i went wrong? cheers
pde
add a comment |Â
up vote
0
down vote
favorite
can someone help by checking my working and perhaps explain where i'm going wrong?
solve the following problem with insulated boundaries
$$textPDE: ~u_t=u_xx$$
$$ textBCs: ~u_x(0,1) = 0~&~ u_x(1,t)=0$$
$$ textIC: ~u(x,0)=x$$
we start with solving the PDE by substituting
$$u(x,t)=X(x)T(t)$$
into the above
this gives
$$u(x,t) = sum_n=1^infty A_n e^(-npi)^2tcosnpi x$$
where $$A_n = 2 int_0^1 xcosnpi x$$
then i make $$A_n = 2* left[ fracxsinn pi xn pi|_0^1 - fraccosn pi xn^2 pi^2 |_0^1right] = -fraccosn pi - 1n^2 pi^2 = frac1-(-1)^nn^2 pi^2$$
which alternates between 0 and 2 so letting $n = 2k+1$
$$A_k = frac4(2k+1)^2 pi^2$$
substituting back in and changing the index gives
$$u(x,t) = A_0 + sum_k=1^infty frac4(2k+1)^2 pi^2 e^(-(2k+1)pi)^2tcos(2k+1)pi x$$
$$u(x,t) = frac4pi^2 + frac4pi^2sum_k=1^infty frace^-((2k+1)pi)^2t(2k+1)^2cos(2k+1)pi x $$
which is different from their solution of
$$u(x,t) = frac12 - frac4pi^2 sum_n=1^infty frac1n^2e^-(npi)^2t cosnpi x$$
any ideas where i went wrong? cheers
pde
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
can someone help by checking my working and perhaps explain where i'm going wrong?
solve the following problem with insulated boundaries
$$textPDE: ~u_t=u_xx$$
$$ textBCs: ~u_x(0,1) = 0~&~ u_x(1,t)=0$$
$$ textIC: ~u(x,0)=x$$
we start with solving the PDE by substituting
$$u(x,t)=X(x)T(t)$$
into the above
this gives
$$u(x,t) = sum_n=1^infty A_n e^(-npi)^2tcosnpi x$$
where $$A_n = 2 int_0^1 xcosnpi x$$
then i make $$A_n = 2* left[ fracxsinn pi xn pi|_0^1 - fraccosn pi xn^2 pi^2 |_0^1right] = -fraccosn pi - 1n^2 pi^2 = frac1-(-1)^nn^2 pi^2$$
which alternates between 0 and 2 so letting $n = 2k+1$
$$A_k = frac4(2k+1)^2 pi^2$$
substituting back in and changing the index gives
$$u(x,t) = A_0 + sum_k=1^infty frac4(2k+1)^2 pi^2 e^(-(2k+1)pi)^2tcos(2k+1)pi x$$
$$u(x,t) = frac4pi^2 + frac4pi^2sum_k=1^infty frace^-((2k+1)pi)^2t(2k+1)^2cos(2k+1)pi x $$
which is different from their solution of
$$u(x,t) = frac12 - frac4pi^2 sum_n=1^infty frac1n^2e^-(npi)^2t cosnpi x$$
any ideas where i went wrong? cheers
pde
can someone help by checking my working and perhaps explain where i'm going wrong?
solve the following problem with insulated boundaries
$$textPDE: ~u_t=u_xx$$
$$ textBCs: ~u_x(0,1) = 0~&~ u_x(1,t)=0$$
$$ textIC: ~u(x,0)=x$$
we start with solving the PDE by substituting
$$u(x,t)=X(x)T(t)$$
into the above
this gives
$$u(x,t) = sum_n=1^infty A_n e^(-npi)^2tcosnpi x$$
where $$A_n = 2 int_0^1 xcosnpi x$$
then i make $$A_n = 2* left[ fracxsinn pi xn pi|_0^1 - fraccosn pi xn^2 pi^2 |_0^1right] = -fraccosn pi - 1n^2 pi^2 = frac1-(-1)^nn^2 pi^2$$
which alternates between 0 and 2 so letting $n = 2k+1$
$$A_k = frac4(2k+1)^2 pi^2$$
substituting back in and changing the index gives
$$u(x,t) = A_0 + sum_k=1^infty frac4(2k+1)^2 pi^2 e^(-(2k+1)pi)^2tcos(2k+1)pi x$$
$$u(x,t) = frac4pi^2 + frac4pi^2sum_k=1^infty frace^-((2k+1)pi)^2t(2k+1)^2cos(2k+1)pi x $$
which is different from their solution of
$$u(x,t) = frac12 - frac4pi^2 sum_n=1^infty frac1n^2e^-(npi)^2t cosnpi x$$
any ideas where i went wrong? cheers
pde
asked Jul 29 at 8:45
Vaas
335213
335213
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
First of all, you're missing the constant eigen-function, so the full solution is
$$ u(x,t) = A_0 + sum_n=1^infty A_n e^-n^2pi^2tcos(npi x) $$
The constant is given by
$$ A_0 = fracint_0^1 x dxint_0^1 1^2 dx = frac12 $$
For the remaining coefficients
$$ A_n = fracint_0^1 x cos(npi x) dxint_0^1 cos^2(npi x) dx = 2int_0^1xcos(npi x) dx $$
You made a small sign error at this point. Integration by parts gives
beginalign A_n &= frac2xsin(npi x)npiBigg|_0^1 - int_0^1 frac2sin(npi x)npi dx \
&= frac2cos(npi x)n^2pi^2Bigg|_0^1 \
&= frac2n^2pi^2(cos(npi)-1) \
&= frac2n^2pi^2((-1)^n-1)
endalign
which equals $0$ when $n$ is even and $-frac4n^2pi^2$ when $n$ is odd, so the final solution is
$$ u(x,t) = frac12 - sum_n=2k+1,k=0^inftyfrac4n^2pi^2 e^-n^2pi^2tcos(npi x) $$
The answer key probably forgot to say that $n$ needs to be odd.
hmmm, looks like a couple of silly mistakes on my behalf. thank you! for the constant eiganfunction, (which im guessing i know as the steady state solution) your answer makes it look like its the integral of the IC's over the integral of the length squared. am i right in assuming that? or is it more along the lines of the interpolation between two constants undefined by the question (but must be there given the flux is zero at the boundary conditions)?
– Vaas
Jul 30 at 7:28
Nothing to do with that. The constant function is just part of the eigenfunction set, i.e. solving $X′′+λ2X=0$ when $λ=0$. For convenience, we set the constant equal to $1$. The same steps are taken as the other $A_n$, except with $n$ set to $0$, which results in a different integral and a different normalization. We need this constant function to complete the function space for the initial condition.
– Dylan
Jul 30 at 9:36
my keyboard has taken this opportunity to break so my apologies so we solve $$X''+2 lambda X =0$$ solving and setting $lambda = 0$ gives $X=A$ where A is a constant. then from before we have $$ A_0 = fracint_0^1 x dxint_0^1 cos(0) dx = frac12 $$ am i on the right track ??
– Vaas
Jul 30 at 11:06
The initial function is given by $g(x) = sum_n=0^infty A_nX_n(x)$, where $$ A_n = fracint_0^1 g(x)X_n(x) dxint_0^1 (X_n(x))^2 dx $$, where $X_0 = 1$ and $X_n>0 = cos(npi x)$.
– Dylan
Jul 30 at 16:05
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
First of all, you're missing the constant eigen-function, so the full solution is
$$ u(x,t) = A_0 + sum_n=1^infty A_n e^-n^2pi^2tcos(npi x) $$
The constant is given by
$$ A_0 = fracint_0^1 x dxint_0^1 1^2 dx = frac12 $$
For the remaining coefficients
$$ A_n = fracint_0^1 x cos(npi x) dxint_0^1 cos^2(npi x) dx = 2int_0^1xcos(npi x) dx $$
You made a small sign error at this point. Integration by parts gives
beginalign A_n &= frac2xsin(npi x)npiBigg|_0^1 - int_0^1 frac2sin(npi x)npi dx \
&= frac2cos(npi x)n^2pi^2Bigg|_0^1 \
&= frac2n^2pi^2(cos(npi)-1) \
&= frac2n^2pi^2((-1)^n-1)
endalign
which equals $0$ when $n$ is even and $-frac4n^2pi^2$ when $n$ is odd, so the final solution is
$$ u(x,t) = frac12 - sum_n=2k+1,k=0^inftyfrac4n^2pi^2 e^-n^2pi^2tcos(npi x) $$
The answer key probably forgot to say that $n$ needs to be odd.
hmmm, looks like a couple of silly mistakes on my behalf. thank you! for the constant eiganfunction, (which im guessing i know as the steady state solution) your answer makes it look like its the integral of the IC's over the integral of the length squared. am i right in assuming that? or is it more along the lines of the interpolation between two constants undefined by the question (but must be there given the flux is zero at the boundary conditions)?
– Vaas
Jul 30 at 7:28
Nothing to do with that. The constant function is just part of the eigenfunction set, i.e. solving $X′′+λ2X=0$ when $λ=0$. For convenience, we set the constant equal to $1$. The same steps are taken as the other $A_n$, except with $n$ set to $0$, which results in a different integral and a different normalization. We need this constant function to complete the function space for the initial condition.
– Dylan
Jul 30 at 9:36
my keyboard has taken this opportunity to break so my apologies so we solve $$X''+2 lambda X =0$$ solving and setting $lambda = 0$ gives $X=A$ where A is a constant. then from before we have $$ A_0 = fracint_0^1 x dxint_0^1 cos(0) dx = frac12 $$ am i on the right track ??
– Vaas
Jul 30 at 11:06
The initial function is given by $g(x) = sum_n=0^infty A_nX_n(x)$, where $$ A_n = fracint_0^1 g(x)X_n(x) dxint_0^1 (X_n(x))^2 dx $$, where $X_0 = 1$ and $X_n>0 = cos(npi x)$.
– Dylan
Jul 30 at 16:05
add a comment |Â
up vote
1
down vote
accepted
First of all, you're missing the constant eigen-function, so the full solution is
$$ u(x,t) = A_0 + sum_n=1^infty A_n e^-n^2pi^2tcos(npi x) $$
The constant is given by
$$ A_0 = fracint_0^1 x dxint_0^1 1^2 dx = frac12 $$
For the remaining coefficients
$$ A_n = fracint_0^1 x cos(npi x) dxint_0^1 cos^2(npi x) dx = 2int_0^1xcos(npi x) dx $$
You made a small sign error at this point. Integration by parts gives
beginalign A_n &= frac2xsin(npi x)npiBigg|_0^1 - int_0^1 frac2sin(npi x)npi dx \
&= frac2cos(npi x)n^2pi^2Bigg|_0^1 \
&= frac2n^2pi^2(cos(npi)-1) \
&= frac2n^2pi^2((-1)^n-1)
endalign
which equals $0$ when $n$ is even and $-frac4n^2pi^2$ when $n$ is odd, so the final solution is
$$ u(x,t) = frac12 - sum_n=2k+1,k=0^inftyfrac4n^2pi^2 e^-n^2pi^2tcos(npi x) $$
The answer key probably forgot to say that $n$ needs to be odd.
hmmm, looks like a couple of silly mistakes on my behalf. thank you! for the constant eiganfunction, (which im guessing i know as the steady state solution) your answer makes it look like its the integral of the IC's over the integral of the length squared. am i right in assuming that? or is it more along the lines of the interpolation between two constants undefined by the question (but must be there given the flux is zero at the boundary conditions)?
– Vaas
Jul 30 at 7:28
Nothing to do with that. The constant function is just part of the eigenfunction set, i.e. solving $X′′+λ2X=0$ when $λ=0$. For convenience, we set the constant equal to $1$. The same steps are taken as the other $A_n$, except with $n$ set to $0$, which results in a different integral and a different normalization. We need this constant function to complete the function space for the initial condition.
– Dylan
Jul 30 at 9:36
my keyboard has taken this opportunity to break so my apologies so we solve $$X''+2 lambda X =0$$ solving and setting $lambda = 0$ gives $X=A$ where A is a constant. then from before we have $$ A_0 = fracint_0^1 x dxint_0^1 cos(0) dx = frac12 $$ am i on the right track ??
– Vaas
Jul 30 at 11:06
The initial function is given by $g(x) = sum_n=0^infty A_nX_n(x)$, where $$ A_n = fracint_0^1 g(x)X_n(x) dxint_0^1 (X_n(x))^2 dx $$, where $X_0 = 1$ and $X_n>0 = cos(npi x)$.
– Dylan
Jul 30 at 16:05
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
First of all, you're missing the constant eigen-function, so the full solution is
$$ u(x,t) = A_0 + sum_n=1^infty A_n e^-n^2pi^2tcos(npi x) $$
The constant is given by
$$ A_0 = fracint_0^1 x dxint_0^1 1^2 dx = frac12 $$
For the remaining coefficients
$$ A_n = fracint_0^1 x cos(npi x) dxint_0^1 cos^2(npi x) dx = 2int_0^1xcos(npi x) dx $$
You made a small sign error at this point. Integration by parts gives
beginalign A_n &= frac2xsin(npi x)npiBigg|_0^1 - int_0^1 frac2sin(npi x)npi dx \
&= frac2cos(npi x)n^2pi^2Bigg|_0^1 \
&= frac2n^2pi^2(cos(npi)-1) \
&= frac2n^2pi^2((-1)^n-1)
endalign
which equals $0$ when $n$ is even and $-frac4n^2pi^2$ when $n$ is odd, so the final solution is
$$ u(x,t) = frac12 - sum_n=2k+1,k=0^inftyfrac4n^2pi^2 e^-n^2pi^2tcos(npi x) $$
The answer key probably forgot to say that $n$ needs to be odd.
First of all, you're missing the constant eigen-function, so the full solution is
$$ u(x,t) = A_0 + sum_n=1^infty A_n e^-n^2pi^2tcos(npi x) $$
The constant is given by
$$ A_0 = fracint_0^1 x dxint_0^1 1^2 dx = frac12 $$
For the remaining coefficients
$$ A_n = fracint_0^1 x cos(npi x) dxint_0^1 cos^2(npi x) dx = 2int_0^1xcos(npi x) dx $$
You made a small sign error at this point. Integration by parts gives
beginalign A_n &= frac2xsin(npi x)npiBigg|_0^1 - int_0^1 frac2sin(npi x)npi dx \
&= frac2cos(npi x)n^2pi^2Bigg|_0^1 \
&= frac2n^2pi^2(cos(npi)-1) \
&= frac2n^2pi^2((-1)^n-1)
endalign
which equals $0$ when $n$ is even and $-frac4n^2pi^2$ when $n$ is odd, so the final solution is
$$ u(x,t) = frac12 - sum_n=2k+1,k=0^inftyfrac4n^2pi^2 e^-n^2pi^2tcos(npi x) $$
The answer key probably forgot to say that $n$ needs to be odd.
edited Jul 30 at 9:18
answered Jul 29 at 15:13
Dylan
11.4k31026
11.4k31026
hmmm, looks like a couple of silly mistakes on my behalf. thank you! for the constant eiganfunction, (which im guessing i know as the steady state solution) your answer makes it look like its the integral of the IC's over the integral of the length squared. am i right in assuming that? or is it more along the lines of the interpolation between two constants undefined by the question (but must be there given the flux is zero at the boundary conditions)?
– Vaas
Jul 30 at 7:28
Nothing to do with that. The constant function is just part of the eigenfunction set, i.e. solving $X′′+λ2X=0$ when $λ=0$. For convenience, we set the constant equal to $1$. The same steps are taken as the other $A_n$, except with $n$ set to $0$, which results in a different integral and a different normalization. We need this constant function to complete the function space for the initial condition.
– Dylan
Jul 30 at 9:36
my keyboard has taken this opportunity to break so my apologies so we solve $$X''+2 lambda X =0$$ solving and setting $lambda = 0$ gives $X=A$ where A is a constant. then from before we have $$ A_0 = fracint_0^1 x dxint_0^1 cos(0) dx = frac12 $$ am i on the right track ??
– Vaas
Jul 30 at 11:06
The initial function is given by $g(x) = sum_n=0^infty A_nX_n(x)$, where $$ A_n = fracint_0^1 g(x)X_n(x) dxint_0^1 (X_n(x))^2 dx $$, where $X_0 = 1$ and $X_n>0 = cos(npi x)$.
– Dylan
Jul 30 at 16:05
add a comment |Â
hmmm, looks like a couple of silly mistakes on my behalf. thank you! for the constant eiganfunction, (which im guessing i know as the steady state solution) your answer makes it look like its the integral of the IC's over the integral of the length squared. am i right in assuming that? or is it more along the lines of the interpolation between two constants undefined by the question (but must be there given the flux is zero at the boundary conditions)?
– Vaas
Jul 30 at 7:28
Nothing to do with that. The constant function is just part of the eigenfunction set, i.e. solving $X′′+λ2X=0$ when $λ=0$. For convenience, we set the constant equal to $1$. The same steps are taken as the other $A_n$, except with $n$ set to $0$, which results in a different integral and a different normalization. We need this constant function to complete the function space for the initial condition.
– Dylan
Jul 30 at 9:36
my keyboard has taken this opportunity to break so my apologies so we solve $$X''+2 lambda X =0$$ solving and setting $lambda = 0$ gives $X=A$ where A is a constant. then from before we have $$ A_0 = fracint_0^1 x dxint_0^1 cos(0) dx = frac12 $$ am i on the right track ??
– Vaas
Jul 30 at 11:06
The initial function is given by $g(x) = sum_n=0^infty A_nX_n(x)$, where $$ A_n = fracint_0^1 g(x)X_n(x) dxint_0^1 (X_n(x))^2 dx $$, where $X_0 = 1$ and $X_n>0 = cos(npi x)$.
– Dylan
Jul 30 at 16:05
hmmm, looks like a couple of silly mistakes on my behalf. thank you! for the constant eiganfunction, (which im guessing i know as the steady state solution) your answer makes it look like its the integral of the IC's over the integral of the length squared. am i right in assuming that? or is it more along the lines of the interpolation between two constants undefined by the question (but must be there given the flux is zero at the boundary conditions)?
– Vaas
Jul 30 at 7:28
hmmm, looks like a couple of silly mistakes on my behalf. thank you! for the constant eiganfunction, (which im guessing i know as the steady state solution) your answer makes it look like its the integral of the IC's over the integral of the length squared. am i right in assuming that? or is it more along the lines of the interpolation between two constants undefined by the question (but must be there given the flux is zero at the boundary conditions)?
– Vaas
Jul 30 at 7:28
Nothing to do with that. The constant function is just part of the eigenfunction set, i.e. solving $X′′+λ2X=0$ when $λ=0$. For convenience, we set the constant equal to $1$. The same steps are taken as the other $A_n$, except with $n$ set to $0$, which results in a different integral and a different normalization. We need this constant function to complete the function space for the initial condition.
– Dylan
Jul 30 at 9:36
Nothing to do with that. The constant function is just part of the eigenfunction set, i.e. solving $X′′+λ2X=0$ when $λ=0$. For convenience, we set the constant equal to $1$. The same steps are taken as the other $A_n$, except with $n$ set to $0$, which results in a different integral and a different normalization. We need this constant function to complete the function space for the initial condition.
– Dylan
Jul 30 at 9:36
my keyboard has taken this opportunity to break so my apologies so we solve $$X''+2 lambda X =0$$ solving and setting $lambda = 0$ gives $X=A$ where A is a constant. then from before we have $$ A_0 = fracint_0^1 x dxint_0^1 cos(0) dx = frac12 $$ am i on the right track ??
– Vaas
Jul 30 at 11:06
my keyboard has taken this opportunity to break so my apologies so we solve $$X''+2 lambda X =0$$ solving and setting $lambda = 0$ gives $X=A$ where A is a constant. then from before we have $$ A_0 = fracint_0^1 x dxint_0^1 cos(0) dx = frac12 $$ am i on the right track ??
– Vaas
Jul 30 at 11:06
The initial function is given by $g(x) = sum_n=0^infty A_nX_n(x)$, where $$ A_n = fracint_0^1 g(x)X_n(x) dxint_0^1 (X_n(x))^2 dx $$, where $X_0 = 1$ and $X_n>0 = cos(npi x)$.
– Dylan
Jul 30 at 16:05
The initial function is given by $g(x) = sum_n=0^infty A_nX_n(x)$, where $$ A_n = fracint_0^1 g(x)X_n(x) dxint_0^1 (X_n(x))^2 dx $$, where $X_0 = 1$ and $X_n>0 = cos(npi x)$.
– Dylan
Jul 30 at 16:05
add a comment |Â
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%2fmath.stackexchange.com%2fquestions%2f2865900%2fapde-help-partial-differential-equations-for-scientists-and-engineers-lesson-7%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