MaplePrimes Questions

I want to create a graph from y1 to yn+1.

Something like:

f(x)=piecewise(

x<a[1],y(x)[1],

for i from 2 to n+1,

a[i-1] <=  x  <=  a[i], y(x)[i];

od:);

plot(f(x),x=0..l);

But then something that works.

Can anyone help me with an example?

 

 

I have read a few papers on accuracy and numerical methods to solve problems.  My personal interest is in very stiff DAE equations of state (eos) for gaseous expansions/flow problems in very high differential starting conditions for the convergence to occur in the initial time steps.

A long time goal has been to convert the FORTRAN real*16 floating point DAE solver (initially ran on CRAY) into Maple proc() using arbitrary precision that actually solves at the hardware float ieee precision.

Any reference material on stiff solvers and maple implementation would be great.

Bill

Dear maple users,

Greetings.

In this code, the problem has executed. But I unable to get the graph.
Kindly do the needful to plot the figure at time t=0.45.
Also, please explain how to import the computed values into an excel file.

Waiting for your reply.JVB.mw
 

restart:

with(PDEtools):

with(plots):

ra:=1:b1:=4:na:=0.7:we:=0.5:eta[1]:=4*0.1:beta:=0.5/1:xi:=tan(0):m:=na:ea:=0.5:

R:=z->piecewise(beta<=z,(1+xi*z)*(1-(64/10)*eta[1]*((11/32)*(z-beta)-(47/48)*(z-beta)^2+(z-beta)^3-(1/3)*(z-beta)^4)),z<=beta+(3/2),(1+xi*z)*(1-(64/10)*eta[1]*((11/32)*(z-beta)-(47/48)*(z-beta)^2+(z-beta)^3-(1/3)*(z-beta)^4)),(1+xi*z));

proc (z) options operator, arrow; piecewise(beta <= z, (1+xi*z)*(1-(32/5)*eta[1]*((11/32)*z-(11/32)*beta-(47/48)*(z-beta)^2+(z-beta)^3-(1/3)*(z-beta)^4)), z <= beta+3/2, (1+xi*z)*(1-(32/5)*eta[1]*((11/32)*z-(11/32)*beta-(47/48)*(z-beta)^2+(z-beta)^3-(1/3)*(z-beta)^4)), 1+xi*z) end proc

(1)

``

PDE :=ra*(diff(f(x,t),t))=+b1*(1+ea*cos(t))+(1/(x*R(z)^2))*diff((x*(m+(1-m)*(1+(we*we*((diff(f(x,t),x)))^((na-1)/2)))^(-1))*(diff(f(x,t),x))),x);

PDE := diff(f(x, t), t) = 4+2.0*cos(t)+((.7+.3/(1+.25/(diff(f(x, t), x))^.1500000000))*(diff(f(x, t), x))+0.1125000000e-1*x*(diff(f(x, t), x, x))/((1+.25/(diff(f(x, t), x))^.1500000000)^2*(diff(f(x, t), x))^.150000000)+x*(.7+.3/(1+.25/(diff(f(x, t), x))^.1500000000))*(diff(f(x, t), x, x)))/(x*piecewise(.5 <= z, 1.440000000-.8800000000*z+2.506666667*(z-.5)^2-2.560000000*(z-.5)^3+.8533333331*(z-.5)^4, z <= 2.000000000, 1.440000000-.8800000000*z+2.506666667*(z-.5)^2-2.560000000*(z-.5)^3+.8533333331*(z-.5)^4, 1)^2)

(2)

IBC := {D[1](f)(0,t)=0,f(1,t)=0,f(x,0)=0};

{f(1, t) = 0, f(x, 0) = 0, (D[1](f))(0, t) = 0}

(3)

z:=0.77:

``

sol := pdsolve(PDE, IBC, numeric, spacestep = 0.1e-1);

module () local INFO; export plot, plot3d, animate, value, settings; option `Copyright (c) 2001 by Waterloo Maple Inc. All rights reserved.`; end module

(4)

 

 

``


 

Download JVB.mw

 

 

Does anyone use maple calculator?

 

I am trying to use it on my iPad for matrix functions.

 

I tried standard maple %T for transpose, get an error.  I've tried -1.  No joy.  

I can't seem to find how to assign to a variable, or use indexing to a matrix element.

 

Any suggestions welcomed for iPad maple functionality. 

Dear all
I solve a nonlinear equation using Newton's method

Using 

https://planetcalc.com/7748/
and maple code I get two different results from sixth iteration  ... What's the problem... I can not understand which one is correct.

Newton.mw

Thank you for your help 

Dear all

I have two equations

the first one: f1(x)=r*x; 

and the second one: f29x)=exp(x);

where r in a real number.

Using maple i try to determine the number of solutions of f1(x)=f2(x) for different value of r.
Using maple, 
for r <0 its obvious we have only one solution, but for r =0; No solution 
My problem for r>0, using maple I trided to plot different curve but I can not conclude, the number of  roots for each value of r

Number_solution.mw

thank you for your help 

 

Fortran 2000 introduced a simple system for interoperability with C. That was expanded in 2020 to provide C macros to support Fortran concepts that do not exist in C, such as optional arguments and assumed-shape arrays. This is all described in Chapter 18 of the Fortran 2020 standard at http://j3-fortran.org/doc/year/21/21-007.pdf.

 

I want to call Maple from Fortran. The StartMaple function has a result of type MKernelVector. I can't find any description of it in the Advanced Maple Programming Guide other than that it's a handle. In order to create a Fortran variable to hold the result of StartMaple, to pass to the other functions, I need to know more. Is it an int or a long or a longlong or a pointer, or what?

 

I guessed longlong would work, but it apparently doesn't. The result value of StartMaple is nonzero and apparently at least 64 bits. Invoking EvalMapleStatement using that result value causes a segmentationf fault (I'm running Debian Buster 10 Linux).

 

That's as far as I've gotten.

 

Any ideas how to proceed?

 

Hi,

I am having trouble with a Lie algebra cohomology computation. Suppose I have a poset on {1,2,3,4} where 1 < 3, 1 < 4, 2 < 3, and 2 < 4. I can express this as a matrix:

* 0 * *
0 * * *
0 0 * 0
0 0 0 *

where *'s mean "any entry in my ground field," say R or C, and 0s are 0s. Basically, if there is a relation between row i and column j, there is a *. This is why there is a * in row-1 and column 3, as 1<3, but a 0 in row-1 and column 2. I can make the collection of all of these matrices into a Lie algebra using the commutator, as it is closed, and can further suppose it is of trace 0 - that is, it is Type A.

My question is this: I know this algebra has non-trivial cohology, and deforms. However, I want to make Maple do this for me, so I can try it on bigger algebras - however it always tells me that the cohomology is dead zero. What am I doing wrong? My approach is this:

Let P equal the following collection of matrices - these form my basis:

 [Matrix(4, 4, [[1, 0, 0, 0], [0, -1, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]), Matrix(4, 4, [[0, 0, 1, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]), Matrix(4, 4, [[0, 0, 0, 1], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]), Matrix(4, 4, [[0, 0, 0, 0], [0, 1, 0, 0], [0, 0, -1, 0], [0, 0, 0, 0]]), Matrix(4, 4, [[0, 0, 0, 0], [0, 0, 1, 0], [0, 0, 0, 0], [0, 0, 0, 0]]), Matrix(4, 4, [[0, 0, 0, 0], [0, 0, 0, 1], [0, 0, 0, 0], [0, 0, 0, 0]]), Matrix(4, 4, [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 1, 0], [0, 0, 0, -1]])]

Now I can run the basic commands to get started:

L := LieAlgebraData(P, Ex1);
DGsetup(L);


I can now go straight to cohomology. If my algebra is named L, then I want to build my cochain complex C^*(L, L):

c := RelativeChains([e1,e2,e3,e4,e5,e6,e7]);

However, the answer is always that there are no non-trivial cochains: the answer is [[], []]. This will make it very difficult to have non-trivial cohomology.

I know this isn't true (see https://arxiv.org/pdf/1407.0428.pdf). I also tried the approach in the Maple documentation, where I work in the adjoint representation. This gave me non-trivial cochains, but the cohomolgy was 0.

Does anyone know what I'm doing wrong?

Thanks!

Hello,

I am trying to calculate the Dirichlet integral with the residue theorem and the LineInt command. I use the classic lace (Cf below) and the function exp(iz)/z. I don't understand why the LineInt function returns zero on the top semicircle. The result should depend on r and only be zero for limit(%, R = infinity).

Thanks for your help.

hi I want to color points like phase portraits of complex functions, so I did something like this:

with(plots);
with(Statistics);
with(LinearAlgebra);
data := Matrix(<Sample(Uniform(-2, 2), [10, 2]) | RandomVector(10, generator = rand(0 .. 3))>);
pointplot(data[() .. (), 1], data[() .. (), 2], symbolsize = 20, symbol = solidbox, colorscheme = ["valuesplit", data[() .. (), 3], [0 = "Red", 1 = "Blue", 2 = "Green", 3 = "Purple"]]);

f := (x, y) -> x^2 - y^2 + 2*I*x*y;
LR := <seq(Re(f(data[1 .. 10, 1 .. 2][i, 1], data[1 .. 10, 1 .. 2][i, 2])), i = 1 .. 10)>;
LI := <seq(Im(f(data[1 .. 10, 1 .. 2][i, 1], data[1 .. 10, 1 .. 2][i, 2])), i = 1 .. 10)>;
pointplot(LR(), LI(), symbolsize = 20, symbol = solidbox, colorscheme = ["valuesplit", data[() .. (), 3], [0 = "Red", 1 = "Blue", 2 = "Green", 3 = "Purple"]]);

there should color points like this in the input (domain coloring of the f(z)=z^2 ):

and output space:

for example these two stripes of pink points on the input space tell us that all those points get mapped
somewhere to the pink direction, the lower right of the output space, thanks in advance

Hello,

I spent some hours to manipulate the Nabla operator as in textbook, but i have an issue.

Thank you for your help

First thing i did is :

with(Physics); with(Vectors);
 

I declare S0 and P0 as constant with

Parameters(S0,P0)

I have the expression

Exp := S0*(P(x, y, z, t) * - P0)

I apply the Nabla Operator and get

(%Nabla) S(x, y, z, t)) = S0*Nabla, P(x, y, z, t) * - S0*NablaP0

As S0 and P0 are constants, How to remove the S0*NablaP0 term  ?

I tried some combinations of expand and simplify.

Howdy,

I am trying to understand various approaches to threading in Maple. I can naturally parallelize some computations, but only if I can figure out threading. The punchline is this - running something on a single core takes significantly longer when I break it into threads.

I picked a command that takes some time - suppose I have a Lie algebra G, and I want to know if H is a subalgebra. If I do this 16 times in a row, it takes about 3 seconds consistently. Here I made an array of 16 copies of H. Then I can simply ask which element is a subalgebra:

is_subalgebra:=proc(list_of_algs)
local i;
for i in list_of algs do
Query(i, "Subalgebra");
end do;
end proc;


Then running the following gives me an answer of about 3:

st := time();
is_subalgebra(my_list);
time() - st;

Suppose I want to run this on cores = 4 or 5 or...

are_subalgebras_t := proc(list, cores)

local ...., mutex, threadlist;
threadlist:= [];
mutex := Threads[Mutex][Create]();
<create cores chunks of list, call it sublist>
for i in sublist do
 Threads[Mutex][Lock](mutex);
 threadlist:= [op(ts), Create(are_subalgebra(i))];
 Threads[Mutex][Unlock](mutex);
end do;
Wait(op(threadlist));
return;
end proc:

The unecessary code is removed, but I:

1: Create a mutex

2: Chunk up my list into as many pieces as I want

3: Lock my mutex

4: Spawn a thread on the current chunk, save the thread id in a list

5: Unlock the mutex (I just want to add thread ids to my list safely)

6: Repeat 3-5 for each chunk

7: Wait until all threads are done

My machine has 16 cores, and if I run this on say 8 cores it takes almost 10 seconds. I can see that it starts executing the threads immediately - an example run shows I might spawn two threads, then the first thread starts, the third spawns, and then they complete in some order. Predictably, every run through is different. This tells me that I am getting parallelization, but at the detriment of runtime.

Can anyone tell me where my approach is going wrong? I was unable to get any Map functions to work at all.

Thanks!


 

NULL

restart

with(LinearAlgebra):

alpha := .985

.985

(1)

for i to 7 do for j from -1 by .1 to 1 do Exact[j] := ((1-j)*(1/2))*exp((1+j)*(1/2)); Y[0] := proc (x) options operator, arrow; -(1/8)*exp(1)+1/2+(-(1/8)*exp(1)-3/4)*x+(1/8)*exp(1)*x^2+((1/8)*exp(1)+1/4)*x^3 end proc; Ics := Z(-1) = 1, Z(1) = 0, (D(Z))(-1) = 0, (D(Z))(1) = -(1/2)*exp(1); exp(x) := convert(taylor(exp(x), x = 0, 25), polynom); f := proc (x) options operator, arrow; ((1/32)*x-5/32)*exp((1/2)*x+1/2) end proc; p := proc (x) options operator, arrow; 0 end proc; q := proc (x) options operator, arrow; -1/4 end proc; r := proc (x) options operator, arrow; 0 end proc; u := proc (x) options operator, arrow; -1/16 end proc; eq[i] := diff(Z(x), `$`(x, 4)) = (1-alpha)*(diff(Y[i-1](x), `$`(x, 4)))+alpha*(f(x)-p(x)*(diff(Y[i-1](x), `$`(x, 3)))-q(x)*(diff(Y[i-1](x), `$`(x, 2)))-r(x)*(diff(Y[i-1](x), x))-u(x)*Y[i-1](x)); s[i] := evalf(dsolve({Ics, eq[i]}, Z(x))); Y[i] := unapply(op(2, s[i]), x); App[j] := evalf(Y[i](j)); Er[j] := abs(App[j]-Exact[j]); print([App[j], Exact[j], Er[j]]) end do end do

[1.00000001, 1, 0.1e-7]

 

[.99889373, .9987075410, 0.1861890e-3]

 

[.99542387, .9946538260, 0.7700440e-3]

 

[.98930908, .9875591065, 0.17499735e-2]

 

[.98020108, .9771222065, 0.30788735e-2]

 

[.96769238, .9630190630, 0.46733170e-2]

 

[.95132386, .9449011655, 0.64226945e-2]

 

[.93059225, .9223939070, 0.81983430e-2]

 

[.90495743, .8950948190, 0.98626110e-2]

 

[.87384983, .8625717020, 0.112781280e-1]

 

[.83667770, .8243606355, 0.123170645e-1]

 

[.79283435, .7799638580, 0.128704920e-1]

 

[.74170543, .7288475200, 0.128579100e-1]

 

[.68267630, .6704392900, 0.122370100e-1]

 

[.61513924, .6041258120, 0.110134280e-1]

 

[.53850104, .5292500040, 0.92510360e-2]

 

[.45219044, .4451081856, 0.70822544e-2]

 

[.35566578, .3509470278, 0.47187522e-2]

 

[.24842284, .2459603111, 0.24625289e-2]

 

[.13000273, .1292854830, 0.7172470e-3]

 

[0., 0., 0.]

 

[1.00000001, 1, 0.1e-7]

 

[.99870526, .9987075410, 0.22810e-5]

 

[.99464487, .9946538260, 0.89560e-5]

 

[.98753974, .9875591065, 0.193665e-4]

 

[.97708963, .9771222065, 0.325765e-4]

 

[.96297160, .9630190630, 0.474630e-4]

 

[.94483868, .9449011655, 0.624855e-4]

 

[.92231783, .9223939070, 0.760770e-4]

 

[.89500815, .8950948190, 0.866690e-4]

 

[.86247884, .8625717020, 0.928620e-4]

 

[.82426685, .8243606355, 0.937855e-4]

 

[.77987484, .7799638580, 0.890180e-4]

 

[.72876867, .7288475200, 0.788500e-4]

 

[.67037492, .6704392900, 0.643700e-4]

 

[.60407851, .6041258120, 0.473020e-4]

 

[.52922004, .5292500040, 0.299640e-4]

 

[.44509347, .4451081856, 0.147156e-4]

 

[.35094315, .3509470278, 0.38778e-5]

 

[.24596164, .2459603111, 0.13289e-5]

 

[.12928690, .1292854830, 0.14170e-5]

 

 

[-0.2e-7, 0., 0.2e-7]

 

[2., 1, 1.]

 

[2., .9987075410, 1.001292459]

 

[2., .9946538260, 1.005346174]

 

[2., .9875591065, 1.012440894]

 

[2., .9771222065, 1.022877794]

 

[2., .9630190630, 1.036980937]

 

[2., .9449011655, 1.055098834]

 

[2., .9223939070, 1.077606093]

 

[2., .8950948190, 1.104905181]

 

[2., .8625717020, 1.137428298]

 

[2., .8243606355, 1.175639364]

 

[2., .7799638580, 1.220036142]

 

[2., .7288475200, 1.271152480]

 

[2., .6704392900, 1.329560710]

 

[2., .6041258120, 1.395874188]

 

[2., .5292500040, 1.470749996]

 

[2., .4451081856, 1.554891814]

 

[2., .3509470278, 1.649052972]

 

[2., .2459603111, 1.754039689]

 

[2., .1292854830, 1.870714517]

 

[2., 0., 2.]

 

[1.00000000, 1, 0.]

 

[.99902820, .9987075410, 0.3206590e-3]

 

[.99581870, .9946538260, 0.11648740e-2]

 

[.98992527, .9875591065, 0.23661635e-2]

 

[.98089421, .9771222065, 0.37720035e-2]

 

[.96826375, .9630190630, 0.52446870e-2]

 

[.95156339, .9449011655, 0.66622245e-2]

 

[.93031319, .9223939070, 0.79192830e-2]

 

[.90402310, .8950948190, 0.89282810e-2]

 

[.87219221, .8625717020, 0.96205080e-2]

 

[.83430805, .8243606355, 0.99474145e-2]

 

[.78984585, .7799638580, 0.98819920e-2]

 

[.73826774, .7288475200, 0.94202200e-2]

 

[.67902206, .6704392900, 0.85827700e-2]

 

[.61154254, .6041258120, 0.74167280e-2]

 

[.53524746, .5292500040, 0.59974560e-2]

 

[.44953895, .4451081856, 0.44307644e-2]

 

[.35380210, .3509470278, 0.28550722e-2]

 

[.24740416, .2459603111, 0.14438489e-2]

 

[.12969376, .1292854830, 0.4082770e-3]

 

[0.1e-7, 0., 0.1e-7]

 

[1.00000002, 1, 0.2e-7]

 

[.99870689, .9987075410, 0.6510e-6]

 

[.99464990, .9946538260, 0.39260e-5]

 

[.98754844, .9875591065, 0.106665e-4]

 

[.97710162, .9771222065, 0.205865e-4]

 

[.96298633, .9630190630, 0.327330e-4]

 

[.94485556, .9449011655, 0.456055e-4]

 

[.92233620, .9223939070, 0.577070e-4]

 

[.89502732, .8950948190, 0.674990e-4]

 

[.86249795, .8625717020, 0.737520e-4]

 

[.82428488, .8243606355, 0.757555e-4]

 

[.77989071, .7799638580, 0.731480e-4]

 

[.72878132, .7288475200, 0.662000e-4]

 

[.67038351, .6704392900, 0.557800e-4]

 

[.60408269, .6041258120, 0.431220e-4]

 

[.52922015, .5292500040, 0.298540e-4]

 

[.44509054, .4451081856, 0.176456e-4]

 

[.35093889, .3509470278, 0.81378e-5]

 

[.24595805, .2459603111, 0.22611e-5]

 

[.12928542, .1292854830, 0.630e-7]

 

[-0.1e-7, 0., 0.1e-7]

 

[1.0000000, 1, 0.]

 

[.9987075, .9987075410, 0.410e-7]

 

[.9946539, .9946538260, 0.740e-7]

 

[.9875592, .9875591065, 0.935e-7]

 

[.9771225, .9771222065, 0.2935e-6]

 

[.9630194, .9630190630, 0.3370e-6]

 

[.9449015, .9449011655, 0.3345e-6]

 

[.9223945, .9223939070, 0.5930e-6]

 

[.8950954, .8950948190, 0.5810e-6]

 

[.8625722, .8625717020, 0.4980e-6]

 

[.8243613, .8243606355, 0.6645e-6]

 

[.7799644, .7799638580, 0.5420e-6]

 

[.7288483, .7288475200, 0.7800e-6]

 

[.6704399, .6704392900, 0.6100e-6]

 

[.6041262, .6041258120, 0.3880e-6]

 

[.5292503, .5292500040, 0.2960e-6]

 

[.4451084, .4451081856, 0.2144e-6]

 

[.3509472, .3509470278, 0.1722e-6]

 

[.2459606, .2459603111, 0.2889e-6]

 

[.1292855, .1292854830, 0.170e-7]

 

[0.1e-6, 0., 0.1e-6]

 

[2., 1, 1.]

 

[2., .9987075410, 1.001292459]

 

[2., .9946538260, 1.005346174]

 

[2., .9875591065, 1.012440894]

 

[2., .9771222065, 1.022877794]

 

[2., .9630190630, 1.036980937]

 

[2., .9449011655, 1.055098834]

 

[2., .9223939070, 1.077606093]

 

[2., .8950948190, 1.104905181]

 

[2., .8625717020, 1.137428298]

 

[2., .8243606355, 1.175639364]

 

[2., .7799638580, 1.220036142]

 

[2., .7288475200, 1.271152480]

 

[2., .6704392900, 1.329560710]

 

[2., .6041258120, 1.395874188]

 

[2., .5292500040, 1.470749996]

 

[2., .4451081856, 1.554891814]

 

[2., .3509470278, 1.649052972]

 

[2., .2459603111, 1.754039689]

 

[2., .1292854830, 1.870714517]

 

[2., 0., 2.]

(2)

``


 

Download fourthLINEARBOUD042021.mw
 

NULL

restart

with(LinearAlgebra):

alpha := .985

.985

(1)

for i to 7 do for j from -1 by .1 to 1 do Exact[j] := ((1-j)*(1/2))*exp((1+j)*(1/2)); Y[0] := proc (x) options operator, arrow; -(1/8)*exp(1)+1/2+(-(1/8)*exp(1)-3/4)*x+(1/8)*exp(1)*x^2+((1/8)*exp(1)+1/4)*x^3 end proc; Ics := Z(-1) = 1, Z(1) = 0, (D(Z))(-1) = 0, (D(Z))(1) = -(1/2)*exp(1); exp(x) := convert(taylor(exp(x), x = 0, 25), polynom); f := proc (x) options operator, arrow; ((1/32)*x-5/32)*exp((1/2)*x+1/2) end proc; p := proc (x) options operator, arrow; 0 end proc; q := proc (x) options operator, arrow; -1/4 end proc; r := proc (x) options operator, arrow; 0 end proc; u := proc (x) options operator, arrow; -1/16 end proc; eq[i] := diff(Z(x), `$`(x, 4)) = (1-alpha)*(diff(Y[i-1](x), `$`(x, 4)))+alpha*(f(x)-p(x)*(diff(Y[i-1](x), `$`(x, 3)))-q(x)*(diff(Y[i-1](x), `$`(x, 2)))-r(x)*(diff(Y[i-1](x), x))-u(x)*Y[i-1](x)); s[i] := evalf(dsolve({Ics, eq[i]}, Z(x))); Y[i] := unapply(op(2, s[i]), x); App[j] := evalf(Y[i](j)); Er[j] := abs(App[j]-Exact[j]); print([App[j], Exact[j], Er[j]]) end do end do

[1.00000001, 1, 0.1e-7]

 

[.99889373, .9987075410, 0.1861890e-3]

 

[.99542387, .9946538260, 0.7700440e-3]

 

[.98930908, .9875591065, 0.17499735e-2]

 

[.98020108, .9771222065, 0.30788735e-2]

 

[.96769238, .9630190630, 0.46733170e-2]

 

[.95132386, .9449011655, 0.64226945e-2]

 

[.93059225, .9223939070, 0.81983430e-2]

 

[.90495743, .8950948190, 0.98626110e-2]

 

[.87384983, .8625717020, 0.112781280e-1]

 

[.83667770, .8243606355, 0.123170645e-1]

 

[.79283435, .7799638580, 0.128704920e-1]

 

[.74170543, .7288475200, 0.128579100e-1]

 

[.68267630, .6704392900, 0.122370100e-1]

 

[.61513924, .6041258120, 0.110134280e-1]

 

[.53850104, .5292500040, 0.92510360e-2]

 

[.45219044, .4451081856, 0.70822544e-2]

 

[.35566578, .3509470278, 0.47187522e-2]

 

[.24842284, .2459603111, 0.24625289e-2]

 

[.13000273, .1292854830, 0.7172470e-3]

 

[0., 0., 0.]

 

[1.00000001, 1, 0.1e-7]

 

[.99870526, .9987075410, 0.22810e-5]

 

[.99464487, .9946538260, 0.89560e-5]

 

[.98753974, .9875591065, 0.193665e-4]

 

[.97708963, .9771222065, 0.325765e-4]

 

[.96297160, .9630190630, 0.474630e-4]

 

[.94483868, .9449011655, 0.624855e-4]

 

[.92231783, .9223939070, 0.760770e-4]

 

[.89500815, .8950948190, 0.866690e-4]

 

[.86247884, .8625717020, 0.928620e-4]

 

[.82426685, .8243606355, 0.937855e-4]

 

[.77987484, .7799638580, 0.890180e-4]

 

[.72876867, .7288475200, 0.788500e-4]

 

[.67037492, .6704392900, 0.643700e-4]

 

[.60407851, .6041258120, 0.473020e-4]

 

[.52922004, .5292500040, 0.299640e-4]

 

[.44509347, .4451081856, 0.147156e-4]

 

[.35094315, .3509470278, 0.38778e-5]

 

[.24596164, .2459603111, 0.13289e-5]

 

[.12928690, .1292854830, 0.14170e-5]

 

[-0.2e-7, 0., 0.2e-7]

 

[2., 1, 1.]

 

[2., .9987075410, 1.001292459]

 

[2., .9946538260, 1.005346174]

 

[2., .9875591065, 1.012440894]

 

[2., .9771222065, 1.022877794]

 

[2., .9630190630, 1.036980937]

 

[2., .9449011655, 1.055098834]

 

[2., .9223939070, 1.077606093]

 

[2., .8950948190, 1.104905181]

 

[2., .8625717020, 1.137428298]

 

[2., .8243606355, 1.175639364]

 

[2., .7799638580, 1.220036142]

 

[2., .7288475200, 1.271152480]

 

[2., .6704392900, 1.329560710]

 

[2., .6041258120, 1.395874188]

 

[2., .5292500040, 1.470749996]

 

[2., .4451081856, 1.554891814]

 

[2., .3509470278, 1.649052972]

 

[2., .2459603111, 1.754039689]

 

[2., .1292854830, 1.870714517]

 

[2., 0., 2.]

 

[1.00000000, 1, 0.]

 

[.99902820, .9987075410, 0.3206590e-3]

 

[.99581870, .9946538260, 0.11648740e-2]

 

[.98992527, .9875591065, 0.23661635e-2]

 

[.98089421, .9771222065, 0.37720035e-2]

 

[.96826375, .9630190630, 0.52446870e-2]

 

[.95156339, .9449011655, 0.66622245e-2]

 

[.93031319, .9223939070, 0.79192830e-2]

 

[.90402310, .8950948190, 0.89282810e-2]

 

[.87219221, .8625717020, 0.96205080e-2]

 

[.83430805, .8243606355, 0.99474145e-2]

 

[.78984585, .7799638580, 0.98819920e-2]

 

[.73826774, .7288475200, 0.94202200e-2]

 

[.67902206, .6704392900, 0.85827700e-2]

 

[.61154254, .6041258120, 0.74167280e-2]

 

[.53524746, .5292500040, 0.59974560e-2]

 

[.44953895, .4451081856, 0.44307644e-2]

 

[.35380210, .3509470278, 0.28550722e-2]

 

[.24740416, .2459603111, 0.14438489e-2]

 

[.12969376, .1292854830, 0.4082770e-3]

 

[0.1e-7, 0., 0.1e-7]

 

[1.00000002, 1, 0.2e-7]

 

[.99870689, .9987075410, 0.6510e-6]

 

[.99464990, .9946538260, 0.39260e-5]

 

[.98754844, .9875591065, 0.106665e-4]

 

[.97710162, .9771222065, 0.205865e-4]

 

[.96298633, .9630190630, 0.327330e-4]

 

[.94485556, .9449011655, 0.456055e-4]

 

[.92233620, .9223939070, 0.577070e-4]

 

[.89502732, .8950948190, 0.674990e-4]

 

[.86249795, .8625717020, 0.737520e-4]

 

[.82428488, .8243606355, 0.757555e-4]

 

[.77989071, .7799638580, 0.731480e-4]

 

[.72878132, .7288475200, 0.662000e-4]

 

[.67038351, .6704392900, 0.557800e-4]

 

[.60408269, .6041258120, 0.431220e-4]

 

[.52922015, .5292500040, 0.298540e-4]

 

[.44509054, .4451081856, 0.176456e-4]

 

[.35093889, .3509470278, 0.81378e-5]

 

[.24595805, .2459603111, 0.22611e-5]

 

[.12928542, .1292854830, 0.630e-7]

 

[-0.1e-7, 0., 0.1e-7]

 

[1.0000000, 1, 0.]

 

[.9987075, .9987075410, 0.410e-7]

 

[.9946539, .9946538260, 0.740e-7]

 

[.9875592, .9875591065, 0.935e-7]

 

[.9771225, .9771222065, 0.2935e-6]

 

[.9630194, .9630190630, 0.3370e-6]

 

[.9449015, .9449011655, 0.3345e-6]

 

[.9223945, .9223939070, 0.5930e-6]

 

[.8950954, .8950948190, 0.5810e-6]

 

[.8625722, .8625717020, 0.4980e-6]

 

[.8243613, .8243606355, 0.6645e-6]

 

[.7799644, .7799638580, 0.5420e-6]

 

[.7288483, .7288475200, 0.7800e-6]

 

[.6704399, .6704392900, 0.6100e-6]

 

[.6041262, .6041258120, 0.3880e-6]

 

[.5292503, .5292500040, 0.2960e-6]

 

[.4451084, .4451081856, 0.2144e-6]

 

[.3509472, .3509470278, 0.1722e-6]

 

[.2459606, .2459603111, 0.2889e-6]

 

[.1292855, .1292854830, 0.170e-7]

 

[0.1e-6, 0., 0.1e-6]

 

[2., 1, 1.]

 

[2., .9987075410, 1.001292459]

 

[2., .9946538260, 1.005346174]

 

[2., .9875591065, 1.012440894]

 

[2., .9771222065, 1.022877794]

 

[2., .9630190630, 1.036980937]

 

[2., .9449011655, 1.055098834]

 

[2., .9223939070, 1.077606093]

 

[2., .8950948190, 1.104905181]

 

[2., .8625717020, 1.137428298]

 

[2., .8243606355, 1.175639364]

 

[2., .7799638580, 1.220036142]

 

[2., .7288475200, 1.271152480]

 

[2., .6704392900, 1.329560710]

 

[2., .6041258120, 1.395874188]

 

[2., .5292500040, 1.470749996]

 

[2., .4451081856, 1.554891814]

 

[2., .3509470278, 1.649052972]

 

[2., .2459603111, 1.754039689]

 

[2., .1292854830, 1.870714517]

 

[2., 0., 2.]

(2)

``


 

Download fourthLINEARBOUD042021.mw
 

NULL

restart

with(LinearAlgebra):

alpha := .985

.985

(1)

for i to 7 do for j from -1 by .1 to 1 do Exact[j] := ((1-j)*(1/2))*exp((1+j)*(1/2)); Y[0] := proc (x) options operator, arrow; -(1/8)*exp(1)+1/2+(-(1/8)*exp(1)-3/4)*x+(1/8)*exp(1)*x^2+((1/8)*exp(1)+1/4)*x^3 end proc; Ics := Z(-1) = 1, Z(1) = 0, (D(Z))(-1) = 0, (D(Z))(1) = -(1/2)*exp(1); exp(x) := convert(taylor(exp(x), x = 0, 25), polynom); f := proc (x) options operator, arrow; ((1/32)*x-5/32)*exp((1/2)*x+1/2) end proc; p := proc (x) options operator, arrow; 0 end proc; q := proc (x) options operator, arrow; -1/4 end proc; r := proc (x) options operator, arrow; 0 end proc; u := proc (x) options operator, arrow; -1/16 end proc; eq[i] := diff(Z(x), `$`(x, 4)) = (1-alpha)*(diff(Y[i-1](x), `$`(x, 4)))+alpha*(f(x)-p(x)*(diff(Y[i-1](x), `$`(x, 3)))-q(x)*(diff(Y[i-1](x), `$`(x, 2)))-r(x)*(diff(Y[i-1](x), x))-u(x)*Y[i-1](x)); s[i] := evalf(dsolve({Ics, eq[i]}, Z(x))); Y[i] := unapply(op(2, s[i]), x); App[j] := evalf(Y[i](j)); Er[j] := abs(App[j]-Exact[j]); print([App[j], Exact[j], Er[j]]) end do end do

[1.00000001, 1, 0.1e-7]

 

[.99889373, .9987075410, 0.1861890e-3]

 

[.99542387, .9946538260, 0.7700440e-3]

 

[.98930908, .9875591065, 0.17499735e-2]

 

[.98020108, .9771222065, 0.30788735e-2]

 

[.96769238, .9630190630, 0.46733170e-2]

 

[.95132386, .9449011655, 0.64226945e-2]

 

[.93059225, .9223939070, 0.81983430e-2]

 

[.90495743, .8950948190, 0.98626110e-2]

 

[.87384983, .8625717020, 0.112781280e-1]

 

[.83667770, .8243606355, 0.123170645e-1]

 

[.79283435, .7799638580, 0.128704920e-1]

 

[.74170543, .7288475200, 0.128579100e-1]

 

[.68267630, .6704392900, 0.122370100e-1]

 

[.61513924, .6041258120, 0.110134280e-1]

 

[.53850104, .5292500040, 0.92510360e-2]

 

[.45219044, .4451081856, 0.70822544e-2]

 

[.35566578, .3509470278, 0.47187522e-2]

 

[.24842284, .2459603111, 0.24625289e-2]

 

[.13000273, .1292854830, 0.7172470e-3]

 

[0., 0., 0.]

 

[1.00000001, 1, 0.1e-7]

 

[.99870526, .9987075410, 0.22810e-5]

 

[.99464487, .9946538260, 0.89560e-5]

 

[.98753974, .9875591065, 0.193665e-4]

 

[.97708963, .9771222065, 0.325765e-4]

 

[.96297160, .9630190630, 0.474630e-4]

 

[.94483868, .9449011655, 0.624855e-4]

 

[.92231783, .9223939070, 0.760770e-4]

 

[.89500815, .8950948190, 0.866690e-4]

 

[.86247884, .8625717020, 0.928620e-4]

 

[.82426685, .8243606355, 0.937855e-4]

 

[.77987484, .7799638580, 0.890180e-4]

 

[.72876867, .7288475200, 0.788500e-4]

 

[.67037492, .6704392900, 0.643700e-4]

 

[.60407851, .6041258120, 0.473020e-4]

 

[.52922004, .5292500040, 0.299640e-4]

 

[.44509347, .4451081856, 0.147156e-4]

 

[.35094315, .3509470278, 0.38778e-5]

 

[.24596164, .2459603111, 0.13289e-5]

 

[.12928690, .1292854830, 0.14170e-5]

 

[-0.2e-7, 0., 0.2e-7]

 

[2., 1, 1.]

 

[2., .9987075410, 1.001292459]

 

[2., .9946538260, 1.005346174]

 

[2., .9875591065, 1.012440894]

 

[2., .9771222065, 1.022877794]

 

[2., .9630190630, 1.036980937]

 

[2., .9449011655, 1.055098834]

 

[2., .9223939070, 1.077606093]

 

[2., .8950948190, 1.104905181]

 

[2., .8625717020, 1.137428298]

 

[2., .8243606355, 1.175639364]

 

[2., .7799638580, 1.220036142]

 

[2., .7288475200, 1.271152480]

 

[2., .6704392900, 1.329560710]

 

[2., .6041258120, 1.395874188]

 

[2., .5292500040, 1.470749996]

 

[2., .4451081856, 1.554891814]

 

[2., .3509470278, 1.649052972]

 

[2., .2459603111, 1.754039689]

 

[2., .1292854830, 1.870714517]

 

[2., 0., 2.]

 

[1.00000000, 1, 0.]

 

[.99902820, .9987075410, 0.3206590e-3]

 

[.99581870, .9946538260, 0.11648740e-2]

 

[.98992527, .9875591065, 0.23661635e-2]

 

[.98089421, .9771222065, 0.37720035e-2]

 

[.96826375, .9630190630, 0.52446870e-2]

 

[.95156339, .9449011655, 0.66622245e-2]

 

[.93031319, .9223939070, 0.79192830e-2]

 

[.90402310, .8950948190, 0.89282810e-2]

 

[.87219221, .8625717020, 0.96205080e-2]

 

[.83430805, .8243606355, 0.99474145e-2]

 

[.78984585, .7799638580, 0.98819920e-2]

 

[.73826774, .7288475200, 0.94202200e-2]

 

[.67902206, .6704392900, 0.85827700e-2]

 

[.61154254, .6041258120, 0.74167280e-2]

 

[.53524746, .5292500040, 0.59974560e-2]

 

[.44953895, .4451081856, 0.44307644e-2]

 

[.35380210, .3509470278, 0.28550722e-2]

 

[.24740416, .2459603111, 0.14438489e-2]

 

[.12969376, .1292854830, 0.4082770e-3]

 

[0.1e-7, 0., 0.1e-7]

 

[1.00000002, 1, 0.2e-7]

 

[.99870689, .9987075410, 0.6510e-6]

 

[.99464990, .9946538260, 0.39260e-5]

 

[.98754844, .9875591065, 0.106665e-4]

 

[.97710162, .9771222065, 0.205865e-4]

 

[.96298633, .9630190630, 0.327330e-4]

 

[.94485556, .9449011655, 0.456055e-4]

 

[.92233620, .9223939070, 0.577070e-4]

 

[.89502732, .8950948190, 0.674990e-4]

 

[.86249795, .8625717020, 0.737520e-4]

 

[.82428488, .8243606355, 0.757555e-4]

 

[.77989071, .7799638580, 0.731480e-4]

 

[.72878132, .7288475200, 0.662000e-4]

 

[.67038351, .6704392900, 0.557800e-4]

 

[.60408269, .6041258120, 0.431220e-4]

 

[.52922015, .5292500040, 0.298540e-4]

 

[.44509054, .4451081856, 0.176456e-4]

 

[.35093889, .3509470278, 0.81378e-5]

 

[.24595805, .2459603111, 0.22611e-5]

 

[.12928542, .1292854830, 0.630e-7]

 

[-0.1e-7, 0., 0.1e-7]

 

[1.0000000, 1, 0.]

 

[.9987075, .9987075410, 0.410e-7]

 

[.9946539, .9946538260, 0.740e-7]

 

[.9875592, .9875591065, 0.935e-7]

 

[.9771225, .9771222065, 0.2935e-6]

 

[.9630194, .9630190630, 0.3370e-6]

 

[.9449015, .9449011655, 0.3345e-6]

 

[.9223945, .9223939070, 0.5930e-6]

 

[.8950954, .8950948190, 0.5810e-6]

 

[.8625722, .8625717020, 0.4980e-6]

 

[.8243613, .8243606355, 0.6645e-6]

 

[.7799644, .7799638580, 0.5420e-6]

 

[.7288483, .7288475200, 0.7800e-6]

 

[.6704399, .6704392900, 0.6100e-6]

 

[.6041262, .6041258120, 0.3880e-6]

 

[.5292503, .5292500040, 0.2960e-6]

 

[.4451084, .4451081856, 0.2144e-6]

 

[.3509472, .3509470278, 0.1722e-6]

 

[.2459606, .2459603111, 0.2889e-6]

 

[.1292855, .1292854830, 0.170e-7]

 

[0.1e-6, 0., 0.1e-6]

 

[2., 1, 1.]

 

[2., .9987075410, 1.001292459]

 

[2., .9946538260, 1.005346174]

 

[2., .9875591065, 1.012440894]

 

[2., .9771222065, 1.022877794]

 

[2., .9630190630, 1.036980937]

 

[2., .9449011655, 1.055098834]

 

[2., .9223939070, 1.077606093]

 

[2., .8950948190, 1.104905181]

 

[2., .8625717020, 1.137428298]

 

[2., .8243606355, 1.175639364]

 

[2., .7799638580, 1.220036142]

 

[2., .7288475200, 1.271152480]

 

[2., .6704392900, 1.329560710]

 

[2., .6041258120, 1.395874188]

 

[2., .5292500040, 1.470749996]

 

[2., .4451081856, 1.554891814]

 

[2., .3509470278, 1.649052972]

 

[2., .2459603111, 1.754039689]

 

[2., .1292854830, 1.870714517]

 

[2., 0., 2.]

(2)

``


 

Download fourthLINEARBOUD042021.mw
 

NULL

restart

with(LinearAlgebra):

alpha := .985

.985

(1)

for i to 7 do for j from -1 by .1 to 1 do Exact[j] := ((1-j)*(1/2))*exp((1+j)*(1/2)); Y[0] := proc (x) options operator, arrow; -(1/8)*exp(1)+1/2+(-(1/8)*exp(1)-3/4)*x+(1/8)*exp(1)*x^2+((1/8)*exp(1)+1/4)*x^3 end proc; Ics := Z(-1) = 1, Z(1) = 0, (D(Z))(-1) = 0, (D(Z))(1) = -(1/2)*exp(1); exp(x) := convert(taylor(exp(x), x = 0, 25), polynom); f := proc (x) options operator, arrow; ((1/32)*x-5/32)*exp((1/2)*x+1/2) end proc; p := proc (x) options operator, arrow; 0 end proc; q := proc (x) options operator, arrow; -1/4 end proc; r := proc (x) options operator, arrow; 0 end proc; u := proc (x) options operator, arrow; -1/16 end proc; eq[i] := diff(Z(x), `$`(x, 4)) = (1-alpha)*(diff(Y[i-1](x), `$`(x, 4)))+alpha*(f(x)-p(x)*(diff(Y[i-1](x), `$`(x, 3)))-q(x)*(diff(Y[i-1](x), `$`(x, 2)))-r(x)*(diff(Y[i-1](x), x))-u(x)*Y[i-1](x)); s[i] := evalf(dsolve({Ics, eq[i]}, Z(x))); Y[i] := unapply(op(2, s[i]), x); App[j] := evalf(Y[i](j)); Er[j] := abs(App[j]-Exact[j]); print([App[j], Exact[j], Er[j]]) end do end do

[1.00000001, 1, 0.1e-7]

 

[.99889373, .9987075410, 0.1861890e-3]

 

[.99542387, .9946538260, 0.7700440e-3]

 

[.98930908, .9875591065, 0.17499735e-2]

 

[.98020108, .9771222065, 0.30788735e-2]

 

[.96769238, .9630190630, 0.46733170e-2]

 

[.95132386, .9449011655, 0.64226945e-2]

 

[.93059225, .9223939070, 0.81983430e-2]

 

[.90495743, .8950948190, 0.98626110e-2]

 

[.87384983, .8625717020, 0.112781280e-1]

 

[.83667770, .8243606355, 0.123170645e-1]

 

[.79283435, .7799638580, 0.128704920e-1]

 

[.74170543, .7288475200, 0.128579100e-1]

 

[.68267630, .6704392900, 0.122370100e-1]

 

[.61513924, .6041258120, 0.110134280e-1]

 

[.53850104, .5292500040, 0.92510360e-2]

 

[.45219044, .4451081856, 0.70822544e-2]

 

[.35566578, .3509470278, 0.47187522e-2]

 

[.24842284, .2459603111, 0.24625289e-2]

 

[.13000273, .1292854830, 0.7172470e-3]

 

[0., 0., 0.]

 

[1.00000001, 1, 0.1e-7]

 

[.99870526, .9987075410, 0.22810e-5]

 

[.99464487, .9946538260, 0.89560e-5]

 

[.98753974, .9875591065, 0.193665e-4]

 

[.97708963, .9771222065, 0.325765e-4]

 

[.96297160, .9630190630, 0.474630e-4]

 

[.94483868, .9449011655, 0.624855e-4]

 

[.92231783, .9223939070, 0.760770e-4]

 

[.89500815, .8950948190, 0.866690e-4]

 

[.86247884, .8625717020, 0.928620e-4]

 

[.82426685, .8243606355, 0.937855e-4]

 

[.77987484, .7799638580, 0.890180e-4]

 

[.72876867, .7288475200, 0.788500e-4]

 

[.67037492, .6704392900, 0.643700e-4]

 

[.60407851, .6041258120, 0.473020e-4]

 

[.52922004, .5292500040, 0.299640e-4]

 

[.44509347, .4451081856, 0.147156e-4]

 

[.35094315, .3509470278, 0.38778e-5]

 

[.24596164, .2459603111, 0.13289e-5]

 

[.12928690, .1292854830, 0.14170e-5]

 

[-0.2e-7, 0., 0.2e-7]

 

[2., 1, 1.]

 

[2., .9987075410, 1.001292459]

 

[2., .9946538260, 1.005346174]

 

[2., .9875591065, 1.012440894]

 

[2., .9771222065, 1.022877794]

 

[2., .9630190630, 1.036980937]

 

[2., .9449011655, 1.055098834]

 

[2., .9223939070, 1.077606093]

 

[2., .8950948190, 1.104905181]

 

[2., .8625717020, 1.137428298]

 

[2., .8243606355, 1.175639364]

 

[2., .7799638580, 1.220036142]

 

[2., .7288475200, 1.271152480]

 

[2., .6704392900, 1.329560710]

 

[2., .6041258120, 1.395874188]

 

[2., .5292500040, 1.470749996]

 

[2., .4451081856, 1.554891814]

 

[2., .3509470278, 1.649052972]

 

[2., .2459603111, 1.754039689]

 

[2., .1292854830, 1.870714517]

 

[2., 0., 2.]

 

[1.00000000, 1, 0.]

 

[.99902820, .9987075410, 0.3206590e-3]

 

[.99581870, .9946538260, 0.11648740e-2]

 

[.98992527, .9875591065, 0.23661635e-2]

 

[.98089421, .9771222065, 0.37720035e-2]

 

[.96826375, .9630190630, 0.52446870e-2]

 

[.95156339, .9449011655, 0.66622245e-2]

 

[.93031319, .9223939070, 0.79192830e-2]

 

[.90402310, .8950948190, 0.89282810e-2]

 

[.87219221, .8625717020, 0.96205080e-2]

 

[.83430805, .8243606355, 0.99474145e-2]

 

[.78984585, .7799638580, 0.98819920e-2]

 

[.73826774, .7288475200, 0.94202200e-2]

 

[.67902206, .6704392900, 0.85827700e-2]

 

[.61154254, .6041258120, 0.74167280e-2]

 

[.53524746, .5292500040, 0.59974560e-2]

 

[.44953895, .4451081856, 0.44307644e-2]

 

[.35380210, .3509470278, 0.28550722e-2]

 

[.24740416, .2459603111, 0.14438489e-2]

 

[.12969376, .1292854830, 0.4082770e-3]

 

[0.1e-7, 0., 0.1e-7]

 

[1.00000002, 1, 0.2e-7]

 

[.99870689, .9987075410, 0.6510e-6]

 

[.99464990, .9946538260, 0.39260e-5]

 

[.98754844, .9875591065, 0.106665e-4]

 

[.97710162, .9771222065, 0.205865e-4]

 

[.96298633, .9630190630, 0.327330e-4]

 

[.94485556, .9449011655, 0.456055e-4]

 

[.92233620, .9223939070, 0.577070e-4]

 

[.89502732, .8950948190, 0.674990e-4]

 

[.86249795, .8625717020, 0.737520e-4]

 

[.82428488, .8243606355, 0.757555e-4]

 

[.77989071, .7799638580, 0.731480e-4]

 

[.72878132, .7288475200, 0.662000e-4]

 

[.67038351, .6704392900, 0.557800e-4]

 

[.60408269, .6041258120, 0.431220e-4]

 

[.52922015, .5292500040, 0.298540e-4]

 

[.44509054, .4451081856, 0.176456e-4]

 

[.35093889, .3509470278, 0.81378e-5]

 

[.24595805, .2459603111, 0.22611e-5]

 

[.12928542, .1292854830, 0.630e-7]

 

[-0.1e-7, 0., 0.1e-7]

 

[1.0000000, 1, 0.]

 

[.9987075, .9987075410, 0.410e-7]

 

[.9946539, .9946538260, 0.740e-7]

 

[.9875592, .9875591065, 0.935e-7]

 

[.9771225, .9771222065, 0.2935e-6]

 

[.9630194, .9630190630, 0.3370e-6]

 

[.9449015, .9449011655, 0.3345e-6]

 

[.9223945, .9223939070, 0.5930e-6]

 

[.8950954, .8950948190, 0.5810e-6]

 

[.8625722, .8625717020, 0.4980e-6]

 

[.8243613, .8243606355, 0.6645e-6]

 

[.7799644, .7799638580, 0.5420e-6]

 

[.7288483, .7288475200, 0.7800e-6]

 

[.6704399, .6704392900, 0.6100e-6]

 

[.6041262, .6041258120, 0.3880e-6]

 

[.5292503, .5292500040, 0.2960e-6]

 

[.4451084, .4451081856, 0.2144e-6]

 

[.3509472, .3509470278, 0.1722e-6]

 

[.2459606, .2459603111, 0.2889e-6]

 

[.1292855, .1292854830, 0.170e-7]

 

[0.1e-6, 0., 0.1e-6]

 

[2., 1, 1.]

 

[2., .9987075410, 1.001292459]

 

[2., .9946538260, 1.005346174]

 

[2., .9875591065, 1.012440894]

 

[2., .9771222065, 1.022877794]

 

[2., .9630190630, 1.036980937]

 

[2., .9449011655, 1.055098834]

 

[2., .9223939070, 1.077606093]

 

[2., .8950948190, 1.104905181]

 

[2., .8625717020, 1.137428298]

 

[2., .8243606355, 1.175639364]

 

[2., .7799638580, 1.220036142]

 

[2., .7288475200, 1.271152480]

 

[2., .6704392900, 1.329560710]

 

[2., .6041258120, 1.395874188]

 

[2., .5292500040, 1.470749996]

 

[2., .4451081856, 1.554891814]

 

[2., .3509470278, 1.649052972]

 

[2., .2459603111, 1.754039689]

 

[2., .1292854830, 1.870714517]

 

[2., 0., 2.]

(2)

``


 

Download fourthLINEARBOUD042021.mw

 

 

 

PLS FIND ATTACHED A MAPLE CODE TO SOLVE SOME BOUNDARY VALUE PROBLEM, BUT IT JUMP SOME ITERATION WITHOUT EVALUATION WHICH END UP WITH INACCURATE SOLUTION.

> restart;
> with(LinearAlgebra);
> exp(1) := 2.7182818284590452354;
> alpha := .975;
> NULL;
> st := time[real]();
> for i to 4 do for j from 0 by .1 to 4-exp(1) do Exact[j] := evalf(ln(exp(1)+j)); Y[0] := proc (x) options operator, arrow; 1+x/exp(1)+(1/4)*((exp(1))^2-8*exp(1)+24*ln(2)*exp(1)-32)*x^2/(exp(1)*(16-8*exp(1)+(exp(1))^2))+(1/4)*(16*ln(2)*exp(1)-16-8*exp(1)+(exp(1))^2)*x^3/((-64+48*exp(1)-12*(exp(1))^2+(exp(1))^3)*exp(1)) end proc; Ics := Z(0) = 1, (D(Z))(0) = 1/exp(1), Z(4-exp(1)) = evalf(ln(4)), (D(Z))(4-exp(1)) = 1/4; f := proc (x) options operator, arrow; 0 end proc; p := proc (x) options operator, arrow; 0 end proc; q := proc (x) options operator, arrow; 0 end proc; r := proc (x) options operator, arrow; 0 end proc; u := proc (x) options operator, arrow; 0 end proc; eq[i] := diff(Z(x), `$`(x, 4)) = (1-alpha)*(diff(Y[i-1](x), `$`(x, 4)))+alpha*(-6*convert(taylor(exp(-4*Y[i-1](x)), x = 0, 20), polynom)); s[i] := dsolve({Ics, eq[i]}, Z(x)); Y[i] := unapply(op(2, s[i]), x); App[j] := evalf(Y[i](j)); Er[j] := abs(App[j]-Exact[j]); print([App[j], Exact[j], Er[j]]) end do end do; time[real]()-st;
 

Dear maple users 

Greetings.

I hope you are all fine.

In this code, I am solving the PDEs via pdsolve with numeric.

There is some mistake in the boundary condition and pdsolve.

Kindly help me that to get the solution for this PDE.

Waiting for your reply.

In this problem h(z) is piecewise 

 

Bc:   

code:JVB.mw

 

Note: z=0.5:

First 291 292 293 294 295 296 297 Last Page 293 of 2308