sarra

270 Reputation

6 Badges

11 years, 130 days

MaplePrimes Activity


These are questions asked by sarra

Hi

I need you to help me in writting procedure with input "r" ( order of derivative) and some coefficients seq(alpha[i],i=1..N).  My code work very well, need only put all the element in procedure with output The Taylor series obtained in last line of my code and the order of error.  I want the procedure return the coefficients beta used in the series and the order of Error  and the coefficients beta[i]

May thinks.

Second_Question.mw

 

I will not modify my previous question: only I add this remark. I tried to write these lines of procedure.
Add_display.mw

I need only to add( if the procedure is true) these lines in my procedure.  These lines gives the degree of error computed in the code, but when I put these lines in the codes, there is an error. Thanks for your help.

Degree := degree(Error,stepsize);
    if (showorder) then:
       print(cat(`This stencil is of order `,Degree));
    fi:
    if (showerror) then:
       print(cat(`This leading order term in the error is `,Error));
    fi:
    convert(D[r$n](f)(vars) = stencil,diff);

 

 

 

Hi,

I need your help to fix the error in this code.  many thinks
restart:
pde:=diff(u(t,x),t$2)=diff(u(t,x),x$2)-sin(u(t,x)):
f:=x->x^2:
IBC := {u(0,x)=f(x),u(t,-50)=0,D[2](u)(t, 50)=0,D[1](u)(0, x)=-diff(f(x),x)}:

pds := pdsolve(pde, IBC, numeric):

p1 := pds:-plot(t = 0);
p2 := pds:-plot(t = 1/10);
p3 := pds:-plot(t = 1/2);
p4 := pds:-plot(t = 1);
p5 := pds:-plot(t = 2);
plots[display]({p1, p2, p3, p4, p5}, title = `Sine Gordaon at t=0,0.1,0.5,1,2`);

Dear all,

Please, I need help to remplace in the code attached,  addadd(beta[i]*u(x+[i]*h),i=0..N)+Error; 
by add(beta[i]*u(x+alpha[i]*h),i=0..N)+Error;  I see, that we must add a function, alpha, but how.

I think I must modify this rows: but how:

stencil := add(a[ii[i]]*subsop(r=op(r,phi)+ii[i]*stepsize,phi),i=1..N);

Question2.mw

 

Many thinks

Hi,

I need to solve the linear system  AX=F  without using any  Linearalgebra package. 

 

A is a tridiagonal matrix ( band matrix);

X is vector of size n.

F is the right hand side of my equation AX=F.

F: given, A given, Find X???

restart;

A := n-> Matrix(n,scan=band[1,1],[[seq(b[i],i=2..n)], [seq(a[i],i=1..n)],
                [seq(c[i],i=1..n-1)]] ):
X:=n->[seq(x[i],i=1..n)]:
F:=n->[seq(d[i],i=1..n)]:

 

Thanks

Hi,

I try to solve this equation using pdsolve but there is no results.
restart:
with(PDEtools):
with(plots):

Eq:=diff(u(t,x), t$2) =diff(u(t,x),x$2)+sin(u(t,x));

pdsolve(Eq);

Thank you for your help.

 

First 9 10 11 12 13 14 15 Last Page 11 of 21