maple code correction
Closed this issue · 0 comments
restart;
with(plots);
with(PDEtools);
A := 1;
L := 10;
BB := 1;
f := x -> Asin(Pix/L);
PDE2 := diff(u(x, t), x $ 3) - diff(u(x, t), x)^2 + u(x, t)diff(u(x, t), x $ 2) + BB^2 - tdiff(u(x, t), x)diff(diff(u(x, t), x), t) + tdiff(u(x, t), t)*diff(u(x, t), x $ 2) = 0;
IC := u(x, 0) = f(x);
BC := {u(0, t) = 0, D1(0, t) = 1, D1(10, t) = BB};
pds := pdsolve(PDE2, {BC, IC}, numeric, time = t, range = 0 .. 10, spacestep = 0.1, timestep = 0.01);
if type(pds, 'procedure') then
plot3d(eval(u(x, t), pds), x = 0 .. 10, t = 0 .. 10, axes = boxed, labels = ["x", "t", "u(x,t)"], title = "Solution of the PDE");
else
print("Numerical solution could not be obtained.");
end if;
[animate, animate3d, animatecurve, arrow, changecoords,
complexplot, complexplot3d, conformal, conformal3d,
contourplot, contourplot3d, coordplot, coordplot3d,
densityplot, display, dualaxisplot, fieldplot, fieldplot3d,
gradplot, gradplot3d, implicitplot, implicitplot3d, inequal,
interactive, interactiveparams, intersectplot, listcontplot,
listcontplot3d, listdensityplot, listplot, listplot3d,
loglogplot, logplot, matrixplot, multiple, odeplot, pareto,
plotcompare, pointplot, pointplot3d, polarplot, polygonplot,
polygonplot3d, polyhedra_supported, polyhedraplot, rootlocus,
semilogplot, setcolors, setoptions, setoptions3d, shadebetween,
spacecurve, sparsematrixplot, surfdata, textplot, textplot3d,
tubeplot]
[CanonicalCoordinates, ChangeSymmetry, CharacteristicQ,
CharacteristicQInvariants, ConservedCurrentTest,
ConservedCurrents, ConsistencyTest, D_Dx, DeterminingPDE,
Eta_k, Euler, FirstIntegralSolver, FromJet,
FunctionFieldSolutions, InfinitesimalGenerator, Infinitesimals,
IntegratingFactorTest, IntegratingFactors, InvariantEquation,
InvariantSolutions, InvariantTransformation, Invariants,
Laplace, Library, PDEplot, PolynomialSolutions, ReducedForm,
SimilaritySolutions, SimilarityTransformation, Solve,
SymmetryCommutator, SymmetryGauge, SymmetrySolutions,
SymmetryTest, SymmetryTransformation, TWSolutions, ToJet,
ToMissingDependentVariable, build, casesplit, charstrip,
dchange, dcoeffs, declare, diff_table, difforder, dpolyform,
dsubs, mapde, separability, splitstrip, splitsys, undeclare]
A := 1
L := 10
BB := 1
f := proc (x) options operator, arrow; Asin(Pix/L) end proc
/ 3 \ 2 / 2 \
| d | / d \ | d |
PDE2 := |---- u(x, t)| - |--- u(x, t)| + u(x, t) |---- u(x, t)|
| 3 | \ dx / | 2 |
\ dx / \ dx /
/ 2 \
/ d \ | d |
-
1 - t |--- u(x, t)| |------ u(x, t)|
\ dx / \ dx dt // 2 \
/ d \ | d |
-
t |--- u(x, t)| |---- u(x, t)| = 0
\ dt / | 2 |
\ dx //1 \ IC := u(x, 0) = sin|-- Pi x| \10 /
BC := {u(0, t) = 0, D1(0, t) = 1, D1(10, t) = 1}
Error, (in pdsolve/numeric/process_IBCs) invalid initial/boundary condition: {u(0,t) = 0, D1(0,t) = 1, D1(10,t) = 1}
"Numerical solution could not be obtained."
NULL;