Using alternating-direction implicit method to solve nonzero boundary value problem (transform into zero boundary value problem)Initial-boundary value problem for PDEHeat Equation: Initial value boundary value problemHow to solve this initial-boundary value problem for a PDERunge-Kutta method for PDESolve Burgers' equation after shock formsFinite difference method and division by zero problem with no flux boundary conditionUsing implicit method to solve system analytically and finding errorSolve parabolic PDE with non-zero boundary and initial conditionsHow to Solve This PDE and Deal with Boundary Value Using Method of Characteristics. Work Shown.How to implement boundary value in Python using spectral methods

Short story about space worker geeks who zone out by 'listening' to radiation from stars

Is it okay / does it make sense for another player to join a running game of Munchkin?

Is there a good way to store credentials outside of a password manager?

What will be the benefits of Brexit?

Curses work by shouting - How to avoid collateral damage?

How can I get through very long and very dry, but also very useful technical documents when learning a new tool?

What would happen if the UK refused to take part in EU Parliamentary elections?

Applicability of Single Responsibility Principle

How do I define a right arrow with bar in LaTeX?

What's the purpose of "true" in bash "if sudo true; then"

Is HostGator storing my password in plaintext?

Tiptoe or tiphoof? Adjusting words to better fit fantasy races

How will losing mobility of one hand affect my career as a programmer?

What is difference between behavior and behaviour

Lay out the Carpet

How was Earth single-handedly capable of creating 3 of the 4 gods of chaos?

Ways to speed up user implemented RK4

Dot above capital letter not centred

How can I use the arrow sign in my bash prompt?

What to do with wrong results in talks?

Can a monster with multiattack use this ability if they are missing a limb?

What is the opposite of 'gravitas'?

Is it correct to write "is not focus on"?

How do I keep an essay about "feeling flat" from feeling flat?



Using alternating-direction implicit method to solve nonzero boundary value problem (transform into zero boundary value problem)


Initial-boundary value problem for PDEHeat Equation: Initial value boundary value problemHow to solve this initial-boundary value problem for a PDERunge-Kutta method for PDESolve Burgers' equation after shock formsFinite difference method and division by zero problem with no flux boundary conditionUsing implicit method to solve system analytically and finding errorSolve parabolic PDE with non-zero boundary and initial conditionsHow to Solve This PDE and Deal with Boundary Value Using Method of Characteristics. Work Shown.How to implement boundary value in Python using spectral methods













1












$begingroup$


$$u_t = 0.25(u_xx+u_yy) -8x(x^2+y^2), qquad 0 leq x,y leq 1, qquad 0 leq t leq 0.5,$$
$$u(0,y,t) = y^2 - y, qquad u(1,y,t) = y^2 + y + 1,$$
$$u(x,0,t) = x, qquad u(x,1,t) = 3x,$$
$$u(x,y,0) = y^" + 2xy + x -y.$$



I don't know how to implement the nonzero boundary conditions or transform the problem into a problem with zero boundary conditions.



Here is my attempt:



function [u,x,y,t]=q2(T,K,N,M)
% solves the 2D heat equation u_t=K u_xx+ f(x,y,t) in the unit square
% and on the interval [0,T] with zero boundary condition by ADI method.
%K is the (heat conduction) coefficient in the heat equation.
%N is the number of subintervals in [0,1].
%M is the number of time steps.
h=1/N;
tau=T/M;
gamma=tau*K/h^2;
u=zeros(N+1,N+1,M+1);
u1=zeros(N+1,N+1);
alpha=zeros(N,1);
beta=zeros(N,1);
% grid points
x=(0:N)*h;
y=x;
t=(0:M)*tau;
%initial condition
for k=2:N
for j=2:N
u(k,j,1)=gg(x(k),y(j));
end
end
% ADI method using the double-sweep method
for k=1:N-1
alpha(k+1)=gamma/(2*(1+gamma)-gamma*alpha(k));
end
for n=2:M+1
for j=2:N
for k=2:N
F=-0.5*gamma*(u(k,j-1,n-1)+u(k,j+1,n-1))-(1-gamma)*u(k,j,n-1)...
-0.25*tau*(ff(x(k),y(j),t(n))+ff(x(k),y(j),t(n-1)));
beta(k)=(beta(k-1)*gamma-2*F)/(2*(1+gamma)-gamma*alpha(k-1));
end
for k=N:(-1):2
u1(k,j)=alpha(k)*u1(k+1,j)+beta(k);
end
end
for k=2:N
for j=2:N
F=-0.5*gamma*(u1(k-1,j)+u1(k+1,j))-(1-gamma)*u1(k,j)...
-0.25*tau*(ff(x(k),y(j),t(n))+ff(x(k),y(j),t(n-1)));
beta(j)=(beta(j-1)*gamma-2*F)/(2*(1+gamma)-gamma*alpha(j-1));
end
for j=N:(-1):2
u(k,j,n)=alpha(j)*u(k,j+1,n)+beta(j);
end
end
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function f(x,y,t) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function f=ff(x,y,t)
f=-8*x*(x^2+y^2);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function g(x,y) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function g=gg(x,y)
g=y^2+2*x*y+x-y;









share|cite|improve this question











$endgroup$











  • $begingroup$
    Why is there a $y''$ in the initial condition?
    $endgroup$
    – Dylan
    Mar 18 at 14:19
















1












$begingroup$


$$u_t = 0.25(u_xx+u_yy) -8x(x^2+y^2), qquad 0 leq x,y leq 1, qquad 0 leq t leq 0.5,$$
$$u(0,y,t) = y^2 - y, qquad u(1,y,t) = y^2 + y + 1,$$
$$u(x,0,t) = x, qquad u(x,1,t) = 3x,$$
$$u(x,y,0) = y^" + 2xy + x -y.$$



I don't know how to implement the nonzero boundary conditions or transform the problem into a problem with zero boundary conditions.



Here is my attempt:



function [u,x,y,t]=q2(T,K,N,M)
% solves the 2D heat equation u_t=K u_xx+ f(x,y,t) in the unit square
% and on the interval [0,T] with zero boundary condition by ADI method.
%K is the (heat conduction) coefficient in the heat equation.
%N is the number of subintervals in [0,1].
%M is the number of time steps.
h=1/N;
tau=T/M;
gamma=tau*K/h^2;
u=zeros(N+1,N+1,M+1);
u1=zeros(N+1,N+1);
alpha=zeros(N,1);
beta=zeros(N,1);
% grid points
x=(0:N)*h;
y=x;
t=(0:M)*tau;
%initial condition
for k=2:N
for j=2:N
u(k,j,1)=gg(x(k),y(j));
end
end
% ADI method using the double-sweep method
for k=1:N-1
alpha(k+1)=gamma/(2*(1+gamma)-gamma*alpha(k));
end
for n=2:M+1
for j=2:N
for k=2:N
F=-0.5*gamma*(u(k,j-1,n-1)+u(k,j+1,n-1))-(1-gamma)*u(k,j,n-1)...
-0.25*tau*(ff(x(k),y(j),t(n))+ff(x(k),y(j),t(n-1)));
beta(k)=(beta(k-1)*gamma-2*F)/(2*(1+gamma)-gamma*alpha(k-1));
end
for k=N:(-1):2
u1(k,j)=alpha(k)*u1(k+1,j)+beta(k);
end
end
for k=2:N
for j=2:N
F=-0.5*gamma*(u1(k-1,j)+u1(k+1,j))-(1-gamma)*u1(k,j)...
-0.25*tau*(ff(x(k),y(j),t(n))+ff(x(k),y(j),t(n-1)));
beta(j)=(beta(j-1)*gamma-2*F)/(2*(1+gamma)-gamma*alpha(j-1));
end
for j=N:(-1):2
u(k,j,n)=alpha(j)*u(k,j+1,n)+beta(j);
end
end
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function f(x,y,t) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function f=ff(x,y,t)
f=-8*x*(x^2+y^2);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function g(x,y) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function g=gg(x,y)
g=y^2+2*x*y+x-y;









share|cite|improve this question











$endgroup$











  • $begingroup$
    Why is there a $y''$ in the initial condition?
    $endgroup$
    – Dylan
    Mar 18 at 14:19














1












1








1





$begingroup$


$$u_t = 0.25(u_xx+u_yy) -8x(x^2+y^2), qquad 0 leq x,y leq 1, qquad 0 leq t leq 0.5,$$
$$u(0,y,t) = y^2 - y, qquad u(1,y,t) = y^2 + y + 1,$$
$$u(x,0,t) = x, qquad u(x,1,t) = 3x,$$
$$u(x,y,0) = y^" + 2xy + x -y.$$



I don't know how to implement the nonzero boundary conditions or transform the problem into a problem with zero boundary conditions.



Here is my attempt:



function [u,x,y,t]=q2(T,K,N,M)
% solves the 2D heat equation u_t=K u_xx+ f(x,y,t) in the unit square
% and on the interval [0,T] with zero boundary condition by ADI method.
%K is the (heat conduction) coefficient in the heat equation.
%N is the number of subintervals in [0,1].
%M is the number of time steps.
h=1/N;
tau=T/M;
gamma=tau*K/h^2;
u=zeros(N+1,N+1,M+1);
u1=zeros(N+1,N+1);
alpha=zeros(N,1);
beta=zeros(N,1);
% grid points
x=(0:N)*h;
y=x;
t=(0:M)*tau;
%initial condition
for k=2:N
for j=2:N
u(k,j,1)=gg(x(k),y(j));
end
end
% ADI method using the double-sweep method
for k=1:N-1
alpha(k+1)=gamma/(2*(1+gamma)-gamma*alpha(k));
end
for n=2:M+1
for j=2:N
for k=2:N
F=-0.5*gamma*(u(k,j-1,n-1)+u(k,j+1,n-1))-(1-gamma)*u(k,j,n-1)...
-0.25*tau*(ff(x(k),y(j),t(n))+ff(x(k),y(j),t(n-1)));
beta(k)=(beta(k-1)*gamma-2*F)/(2*(1+gamma)-gamma*alpha(k-1));
end
for k=N:(-1):2
u1(k,j)=alpha(k)*u1(k+1,j)+beta(k);
end
end
for k=2:N
for j=2:N
F=-0.5*gamma*(u1(k-1,j)+u1(k+1,j))-(1-gamma)*u1(k,j)...
-0.25*tau*(ff(x(k),y(j),t(n))+ff(x(k),y(j),t(n-1)));
beta(j)=(beta(j-1)*gamma-2*F)/(2*(1+gamma)-gamma*alpha(j-1));
end
for j=N:(-1):2
u(k,j,n)=alpha(j)*u(k,j+1,n)+beta(j);
end
end
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function f(x,y,t) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function f=ff(x,y,t)
f=-8*x*(x^2+y^2);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function g(x,y) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function g=gg(x,y)
g=y^2+2*x*y+x-y;









share|cite|improve this question











$endgroup$




$$u_t = 0.25(u_xx+u_yy) -8x(x^2+y^2), qquad 0 leq x,y leq 1, qquad 0 leq t leq 0.5,$$
$$u(0,y,t) = y^2 - y, qquad u(1,y,t) = y^2 + y + 1,$$
$$u(x,0,t) = x, qquad u(x,1,t) = 3x,$$
$$u(x,y,0) = y^" + 2xy + x -y.$$



I don't know how to implement the nonzero boundary conditions or transform the problem into a problem with zero boundary conditions.



Here is my attempt:



function [u,x,y,t]=q2(T,K,N,M)
% solves the 2D heat equation u_t=K u_xx+ f(x,y,t) in the unit square
% and on the interval [0,T] with zero boundary condition by ADI method.
%K is the (heat conduction) coefficient in the heat equation.
%N is the number of subintervals in [0,1].
%M is the number of time steps.
h=1/N;
tau=T/M;
gamma=tau*K/h^2;
u=zeros(N+1,N+1,M+1);
u1=zeros(N+1,N+1);
alpha=zeros(N,1);
beta=zeros(N,1);
% grid points
x=(0:N)*h;
y=x;
t=(0:M)*tau;
%initial condition
for k=2:N
for j=2:N
u(k,j,1)=gg(x(k),y(j));
end
end
% ADI method using the double-sweep method
for k=1:N-1
alpha(k+1)=gamma/(2*(1+gamma)-gamma*alpha(k));
end
for n=2:M+1
for j=2:N
for k=2:N
F=-0.5*gamma*(u(k,j-1,n-1)+u(k,j+1,n-1))-(1-gamma)*u(k,j,n-1)...
-0.25*tau*(ff(x(k),y(j),t(n))+ff(x(k),y(j),t(n-1)));
beta(k)=(beta(k-1)*gamma-2*F)/(2*(1+gamma)-gamma*alpha(k-1));
end
for k=N:(-1):2
u1(k,j)=alpha(k)*u1(k+1,j)+beta(k);
end
end
for k=2:N
for j=2:N
F=-0.5*gamma*(u1(k-1,j)+u1(k+1,j))-(1-gamma)*u1(k,j)...
-0.25*tau*(ff(x(k),y(j),t(n))+ff(x(k),y(j),t(n-1)));
beta(j)=(beta(j-1)*gamma-2*F)/(2*(1+gamma)-gamma*alpha(j-1));
end
for j=N:(-1):2
u(k,j,n)=alpha(j)*u(k,j+1,n)+beta(j);
end
end
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function f(x,y,t) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function f=ff(x,y,t)
f=-8*x*(x^2+y^2);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function g(x,y) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function g=gg(x,y)
g=y^2+2*x*y+x-y;






pde matlab






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Mar 17 at 13:30







user572780

















asked Mar 17 at 13:23









user572780user572780

335




335











  • $begingroup$
    Why is there a $y''$ in the initial condition?
    $endgroup$
    – Dylan
    Mar 18 at 14:19

















  • $begingroup$
    Why is there a $y''$ in the initial condition?
    $endgroup$
    – Dylan
    Mar 18 at 14:19
















$begingroup$
Why is there a $y''$ in the initial condition?
$endgroup$
– Dylan
Mar 18 at 14:19





$begingroup$
Why is there a $y''$ in the initial condition?
$endgroup$
– Dylan
Mar 18 at 14:19











1 Answer
1






active

oldest

votes


















0












$begingroup$

For the general boundary conditions



beginalign
u(0,y,t) &= a_1(y) \
u(1,y,t) &= b_1(y) \
u(x,0,t) &= a_2(x) \
u(x,1,t) &= b_2(x)
endalign



You can write $u(x,y,t) = w_1(x,y) + w_2(x,y) + v(x,y,t)$ such that $v(x,y,t)$ is homogeneous and



beginarrayll
beginaligned
w_1(0,y) &= a_1(y) \
w_1(1,y) &= a_2(y)
endaligned &&&
beginaligned
w_2(x,0) &= a_2(x) - w_1(x,0) \
w_2(x,1) &= b_2(x) - w_1(x,1)
endaligned
endarray



The standard approach is to set
beginalign
w_1(x,y) &= (1-x)a_1(y) + xb_1(y) \
w_2(x,y) &= (1-y)[a_2(x) - (1-x)a_1(0) - xb_1(0)] + y[b_2(x) - (1-x)a_1(1) - xb_1(1)]
endalign



For this specific boundary problem, the simplified solution is



$$ w(x,y) = w_1(x,y) + w_2(x,y) = y^2 - y + x + 2xy $$



Note that this approach works only when the boundary is continuous at the "sharp points", i.e. $a_1(0)=a_2(0)$, $b_1(0)=a_2(1)$, $a_1(1)=b_2(0)$, $b_1(1)=b_2(1)$






share|cite|improve this answer









$endgroup$












    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
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3151542%2fusing-alternating-direction-implicit-method-to-solve-nonzero-boundary-value-prob%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









    0












    $begingroup$

    For the general boundary conditions



    beginalign
    u(0,y,t) &= a_1(y) \
    u(1,y,t) &= b_1(y) \
    u(x,0,t) &= a_2(x) \
    u(x,1,t) &= b_2(x)
    endalign



    You can write $u(x,y,t) = w_1(x,y) + w_2(x,y) + v(x,y,t)$ such that $v(x,y,t)$ is homogeneous and



    beginarrayll
    beginaligned
    w_1(0,y) &= a_1(y) \
    w_1(1,y) &= a_2(y)
    endaligned &&&
    beginaligned
    w_2(x,0) &= a_2(x) - w_1(x,0) \
    w_2(x,1) &= b_2(x) - w_1(x,1)
    endaligned
    endarray



    The standard approach is to set
    beginalign
    w_1(x,y) &= (1-x)a_1(y) + xb_1(y) \
    w_2(x,y) &= (1-y)[a_2(x) - (1-x)a_1(0) - xb_1(0)] + y[b_2(x) - (1-x)a_1(1) - xb_1(1)]
    endalign



    For this specific boundary problem, the simplified solution is



    $$ w(x,y) = w_1(x,y) + w_2(x,y) = y^2 - y + x + 2xy $$



    Note that this approach works only when the boundary is continuous at the "sharp points", i.e. $a_1(0)=a_2(0)$, $b_1(0)=a_2(1)$, $a_1(1)=b_2(0)$, $b_1(1)=b_2(1)$






    share|cite|improve this answer









    $endgroup$

















      0












      $begingroup$

      For the general boundary conditions



      beginalign
      u(0,y,t) &= a_1(y) \
      u(1,y,t) &= b_1(y) \
      u(x,0,t) &= a_2(x) \
      u(x,1,t) &= b_2(x)
      endalign



      You can write $u(x,y,t) = w_1(x,y) + w_2(x,y) + v(x,y,t)$ such that $v(x,y,t)$ is homogeneous and



      beginarrayll
      beginaligned
      w_1(0,y) &= a_1(y) \
      w_1(1,y) &= a_2(y)
      endaligned &&&
      beginaligned
      w_2(x,0) &= a_2(x) - w_1(x,0) \
      w_2(x,1) &= b_2(x) - w_1(x,1)
      endaligned
      endarray



      The standard approach is to set
      beginalign
      w_1(x,y) &= (1-x)a_1(y) + xb_1(y) \
      w_2(x,y) &= (1-y)[a_2(x) - (1-x)a_1(0) - xb_1(0)] + y[b_2(x) - (1-x)a_1(1) - xb_1(1)]
      endalign



      For this specific boundary problem, the simplified solution is



      $$ w(x,y) = w_1(x,y) + w_2(x,y) = y^2 - y + x + 2xy $$



      Note that this approach works only when the boundary is continuous at the "sharp points", i.e. $a_1(0)=a_2(0)$, $b_1(0)=a_2(1)$, $a_1(1)=b_2(0)$, $b_1(1)=b_2(1)$






      share|cite|improve this answer









      $endgroup$















        0












        0








        0





        $begingroup$

        For the general boundary conditions



        beginalign
        u(0,y,t) &= a_1(y) \
        u(1,y,t) &= b_1(y) \
        u(x,0,t) &= a_2(x) \
        u(x,1,t) &= b_2(x)
        endalign



        You can write $u(x,y,t) = w_1(x,y) + w_2(x,y) + v(x,y,t)$ such that $v(x,y,t)$ is homogeneous and



        beginarrayll
        beginaligned
        w_1(0,y) &= a_1(y) \
        w_1(1,y) &= a_2(y)
        endaligned &&&
        beginaligned
        w_2(x,0) &= a_2(x) - w_1(x,0) \
        w_2(x,1) &= b_2(x) - w_1(x,1)
        endaligned
        endarray



        The standard approach is to set
        beginalign
        w_1(x,y) &= (1-x)a_1(y) + xb_1(y) \
        w_2(x,y) &= (1-y)[a_2(x) - (1-x)a_1(0) - xb_1(0)] + y[b_2(x) - (1-x)a_1(1) - xb_1(1)]
        endalign



        For this specific boundary problem, the simplified solution is



        $$ w(x,y) = w_1(x,y) + w_2(x,y) = y^2 - y + x + 2xy $$



        Note that this approach works only when the boundary is continuous at the "sharp points", i.e. $a_1(0)=a_2(0)$, $b_1(0)=a_2(1)$, $a_1(1)=b_2(0)$, $b_1(1)=b_2(1)$






        share|cite|improve this answer









        $endgroup$



        For the general boundary conditions



        beginalign
        u(0,y,t) &= a_1(y) \
        u(1,y,t) &= b_1(y) \
        u(x,0,t) &= a_2(x) \
        u(x,1,t) &= b_2(x)
        endalign



        You can write $u(x,y,t) = w_1(x,y) + w_2(x,y) + v(x,y,t)$ such that $v(x,y,t)$ is homogeneous and



        beginarrayll
        beginaligned
        w_1(0,y) &= a_1(y) \
        w_1(1,y) &= a_2(y)
        endaligned &&&
        beginaligned
        w_2(x,0) &= a_2(x) - w_1(x,0) \
        w_2(x,1) &= b_2(x) - w_1(x,1)
        endaligned
        endarray



        The standard approach is to set
        beginalign
        w_1(x,y) &= (1-x)a_1(y) + xb_1(y) \
        w_2(x,y) &= (1-y)[a_2(x) - (1-x)a_1(0) - xb_1(0)] + y[b_2(x) - (1-x)a_1(1) - xb_1(1)]
        endalign



        For this specific boundary problem, the simplified solution is



        $$ w(x,y) = w_1(x,y) + w_2(x,y) = y^2 - y + x + 2xy $$



        Note that this approach works only when the boundary is continuous at the "sharp points", i.e. $a_1(0)=a_2(0)$, $b_1(0)=a_2(1)$, $a_1(1)=b_2(0)$, $b_1(1)=b_2(1)$







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered Mar 19 at 9:07









        DylanDylan

        14.1k31127




        14.1k31127



























            draft saved

            draft discarded
















































            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.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3151542%2fusing-alternating-direction-implicit-method-to-solve-nonzero-boundary-value-prob%23new-answer', 'question_page');

            );

            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







            Popular posts from this blog

            How should I support this large drywall patch? Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?How do I cover large gaps in drywall?How do I keep drywall around a patch from crumbling?Can I glue a second layer of drywall?How to patch long strip on drywall?Large drywall patch: how to avoid bulging seams?Drywall Mesh Patch vs. Bulge? To remove or not to remove?How to fix this drywall job?Prep drywall before backsplashWhat's the best way to fix this horrible drywall patch job?Drywall patching using 3M Patch Plus Primer

            random experiment with two different functions on unit interval Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern)Random variable and probability space notionsRandom Walk with EdgesFinding functions where the increase over a random interval is Poisson distributedNumber of days until dayCan an observed event in fact be of zero probability?Unit random processmodels of coins and uniform distributionHow to get the number of successes given $n$ trials , probability $P$ and a random variable $X$Absorbing Markov chain in a computer. Is “almost every” turned into always convergence in computer executions?Stopped random walk is not uniformly integrable

            Lowndes Grove History Architecture References Navigation menu32°48′6″N 79°57′58″W / 32.80167°N 79.96611°W / 32.80167; -79.9661132°48′6″N 79°57′58″W / 32.80167°N 79.96611°W / 32.80167; -79.9661178002500"National Register Information System"Historic houses of South Carolina"Lowndes Grove""+32° 48' 6.00", −79° 57' 58.00""Lowndes Grove, Charleston County (260 St. Margaret St., Charleston)""Lowndes Grove"The Charleston ExpositionIt Happened in South Carolina"Lowndes Grove (House), Saint Margaret Street & Sixth Avenue, Charleston, Charleston County, SC(Photographs)"Plantations of the Carolina Low Countrye