## 145 Reputation

7 years, 262 days

## How to write boundary condition in pdso...

Maple 18

I have the PDE u_{xx}+u_{yy} = 1 with BC: u|_{x^2+y^2=1} =0 ;

how to write down the command of the BC in solving this PDE?, btw can I make maple show me how to solve this PDE analytically?

Here are the lines that I wrote so far:

pde := diff(u(x, y), x, x)+diff(u(x, y), y, y) = 1;

ans := pdsolve(pde)

how to add the BC correctly to pdsolve? I am not sure how to write the condition x^2+y^2=1 and that u will get a value on this boundary.

## Default method used in pdsolve/numeric...

Maple 2015

I read in the net that the method used in pdsolve numeric is the theta method, my question: is it the most efficient with regard to rate of convergence of the numerical solution of the PDE?

If not then why is it used as the default method?

Thanks.

## Plot of the difference between solutions...

I have the following code:

restart;
PDE := diff(u(x, t), t) = diff(u(x, t), x, x)-sin(x+t)+cos(x+t);
IBC:= D[1](u)(0,t)=-sin(t),
D[1](u)(1,t)=-(u(1, t))^4+(cos(1+t))^4-sin(1+t),
u(x,0)=cos(x);

pds := pdsolve( PDE, [IBC], numeric, time = t, range = 0 .. 1,

spacestep = 0.1e-1, timestep = 0.1e-1,
errorest=true
)

And I want to plot the difference |pds(t,x) - cos(x+t)| in maple for x=1 and t=0..5

I thought to use the following piece of commands but I get an error:

P:=unapply(pds, t,x);
Q:=abs(P(t,x)-cos(x+t));
Q:-plot(x=1, t=0..1);

I get an error that Q isn't a module.

I thought that unapply is used for this case, can you help me with this simple task?

## Searching for a procedure in PDE...

Maple 2015

I have the following two PDEs:

PDE := diff(u(x, t), t) = diff(u(x, t), x, x)+sin(x+t)-cos(x+t);

IBC:= D[1](u)(0,t)=-sin(t),
D[1](u)(1,t)=-sin(1+t),
u(x,0)=cos(x);

pds := pdsolve( PDE, [IBC], numeric, time = t, range = 0 .. 1,
spacestep = 1/32, timestep = 1/32,
errorest=true
)

PDE2 := diff(v(x, t), t) = diff(v(x, t), x, x);
IBC2:= D[1](v)(0,t)=0,
D[1](v)(1,t)=-0.000065*v(1, t)^4,
v(x,0)=1;

pds1 := pdsolve( PDE2, [IBC2], numeric, time = t, range = 0 .. 1,
spacestep = 1/32, timestep = 1/32,
errorest=true
);

Now, what I want to do with these two PDEs is the following:

For each h=timestep=spacestep  = 1/16 , 1/32 , 1/64 , 1/128 , 1/256

Calculate the error norm ||E||_h = sqrt(sum_{j=0}^{1/h} h* |u(j*h,tval)-v(j*h,tval)|^2)

where tval is some chosen point between 0 and 1 (this value is fixed for each spacestep chosen).

And then plot the graph of log ||E||_h vs. log h above.

What I don't know is how to extract each time the spacestep and its PDE's two solutions, does someone have a suggested script to use here?

## Constructing a sequence ...

Maple 2015

How do I construct the seuqence 1/16 , 1/32 , 1/64 , 1/128 , 1/256 in maple?

What's the syntax?

I looked at the examples in here:

http://www.maplesoft.com/support/help/maple/view.aspx?path=seq

But didn't find something similar.

 3 4 5 6 7 Page 5 of 7
﻿