Al86

55 Reputation

4 Badges

3 years, 321 days

MaplePrimes Activity


These are replies submitted by Al86

@tomleslie thanks Tom.

I appreciate your help, if I were to use the same analysis just instead of the error between the two PDEs, only to calculate the norm of the solution of the first PDE, all I need to change in your code is this line:

 

E[p]:= sqrt
( h*add
( (sol[1](j*h))^2,
j=0..1/h
)
):

 

Or do I need to change also other lines of your code?

 

@tomleslie the correct form syntactically is:

||E||_h = sqrt( h*add(abs(u(j*h,tval)-v(j*h,tval))^2, j=0..1/h));

 

I appreciate your help.

 

@Markiyan Hirnyk yes I asked on PDEs, I forgot that I should be using 2^(-k) here.

 

@tomleslie thanks, so much syntax to learn to use here.

 

@tomleslie I am sorry that I am asking another question.

 

But how can I plug a value into mf after the substituion of the numerical paramters, I mean I want to plug in the IBC after the PDEs values of u(x,0) = 1+mf(at t=0) and u(x,0) = 1+myPoly(at t=0) respectively, how to implement this?

 

 I found how to do this for mf, just subs[eval](t=0,mf)=:mf1 I am sure it will work also for the polynomial.

 

@tomleslie , I have another request, how do I use the coefficients of the two approaches (of a*exp(-b*t)-c*t and of the sixth polynomial) in any other further commands; i.e I want to use mf as an explicit function with the numerical coefficients obtained before and the same with the polynomial in further operations.

 

Here's an example of what I want to do:

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

IBC2 := (D[1](v))(0, t) = 0, (D[1](v))(1, t) = -0.65e-4*(v(1, t)+mf)^4, v(x, 0) = 1+a

pds2 := pdsolve(PDE2, [IBC2], numeric, time = t, range = 0 .. 1, spacestep = 0.1e-1, timestep = 0.1e-1, errorest = true)*pds2:-plot(x = 1, t = 0 .. 1)

 

How to make the polynomial and a*exp(-b*t)-c*t with the numerical coefficients available to me?

Thanks in advance.

 

 

@tomleslie thanks.

The polynomial seems like a close to accurate approximation.

 

@tomleslie are there any other methods? how about polynomial interpolation?

 

I don't understand how do I extract the coefficients a,b,c from the fitting a*exp(-b*t)-c*t?

@Preben Alsholm Hi, I am reading the book: Finite elements using maple.

They give a code for collocation approximation to a simple ODE with weights, can we use this approach here with my nonlinear integral equation?

with 100 collocation points x[i]?

 

Here's a preview of the book:

https://books.google.co.il/books?id=5depCAAAQBAJ&pg=PA82&lpg=PA82&dq=collocation+method+in+maple&source=bl&ots=VXQhqX8KMK&sig=y6aeZfLkK-4D-SEafe6u8MIgYTk&hl=en&sa=X&ved=0CC8Q6AEwAWoVChMIgPL9npPPyAIVS-iACh16Wg2r#v=onepage&q=collocation%20method%20in%20maple&f=false

on pages 79-80 there's the code.

A description of collocation method is on page 68.

 

@tomleslie my programming skills are weak, I know, I am trying to ammend it.

 

@tomleslie It looks good.

 

BTW for the case 

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

 

How would I get the slope at each interval of the log ||e||_h vs log h graph, I mean I get a linear piecewise graph, and I want to extract from the graph the slopes at each interval where the graph seems still as a line in that interval (before it breaks into another line).

 

Thanks in advance.

I looked at maple's help, but I don't seem to find an appropriate command to extract the slopes.

 

@tomleslie , I tried using your latest piece of code on the PDE on u but with different boundary conditions, i.e:

D[1](u)(0,t)=0,
        D[1](u)(1,t)=-0.000065*(u(1, t))^4,
        u(x,0)=1;

 

and then I excuted your code, I got the follwoing message:

 

Java(TM) Platform SE binary has stopped working

A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available.

 

Tom, did you try the code in your computer? did it work?

I am using maple 2015.

 

@tomleslie , not quite what I had in mind.

 

I need to plot log ||e||_h vs log h i.e I need to find values of log ||e||_h at different spacesteps h, and then plot log ||e||_h as a function of h.

 

This should be a linear function, and I want to extract the slope of this graph.

 

I appreciate your and others help.

 

@tomleslie , e_j is the value of e(x_j , t) for when x_j = j*h.

 

||e||_h : = (h*(|e(x_0,t)|^2+...+|e(x_N,t)|^2))^(1/2)

 

N is the number of sampling points, for example if I take h=0.01 then there are 100 sampling points.

 

I hoep now this clears matters.

 

@tomleslie , @Carl Love @vv I have another question.

 

I have the same two PDEs as before, but now I want to plot a graph of || e ||_h = \sqrt{\sum_{j=0}^N h |e_j|^2}

 

where e = v-u and h is the spacestep that is being used in pdsolve, N the number of sampling points.

 

I want to plot a graph of log || e||_h vs log h on some (x,t) and also on the boundary (1,t) and (0,t), for each sampling number N, and also extract from the graph the slope of the graph (it should be a straight line).

 

How to do this?

 

1 2 3 4 Page 2 of 4