# Question:How to calculate flux in the heat equation?

## Question:How to calculate flux in the heat equation?

Maple

I solve a boundary value problem for a linear system of first order PDEs
in the unknowns  and   Ultimately, I am interested in the graph
of the function  but numerical artifacts distort that graph badly by
imposing spurious oscillation.

Is there a way to maneuver the calculations to obtain the graph of
without the oscillation?

 > restart;
 > pde1 := diff(u(x,t),t)=diff(v(x,t),x);

 > pde2 := diff(u(x,t),x)=v(x,t);

 > ibc := u(x,0)=1, u(0,t)=0, u(1,t)=0;

 > dsol := pdsolve({pde1,pde2}, {ibc}, numeric, spacestep=0.01, timestep=0.01);

 > dsol:-value(output=listprocedure): my_u := eval(u(x,t), %): my_v := eval(v(x,t), %%):
 > plot3d(my_u(x,t), x=0..1, t=0..0.5);

 > plot3d(my_v(x,t), x=0..1, t=0..0.5);

The oscillations are numerical artifacts.  Can they be avoided?

 > plot(my_v(0,t), t=0..0.5);

A side comment: By eliminating between the two PDEs we see that
satisfies the standard heat equation, thus is the flux.  The expression
expresses the heat flux at the boundary, and that's what I am after.