Zeineb

295 Reputation

7 Badges

5 years, 185 days

MaplePrimes Activity


These are replies submitted by Zeineb

@tomleslie

thank you for message. 
This the main, idea, but there is someting missing. 
I found the same idea in the following link
https://www.youtube.com/watch?v=piJJ9t7qUUo

2d_heat_eq_RK4.mw 

I hope we can try to modify the code

thank you

@tomleslie 

Thank you. 
But, I would like to convert the heat equaitons to a system of ODEs, this can be done using finite difference only in space ( for both x and y), central finite difference, in this case, we get a system of ODEs. 
for example, uxx(x,y,t) approximated by (u(x[i+1],y[j],t) -2*u(x[i],y[j],t)+ u(x[i-1],y[j],t))/dx^2 

the same for uyy, approximated by 

(u(x[i],y[j+1],t) -2*u(x[i],y[j],t)+ u(x[i],y[j-1],t))/dy^2 
for simplicity, ley hx=hy then we get a system of ODEs:
x is vector from 0 to 1 with step size dx. 
y is vector from 0 to 1 with step size dy. 
Nx=length(x), Ny =length(y)

diff(u(x,y,t),t)= (u(x[i+1],y[j],t) -2*u(x[i],y[j],t)+ u(x[i-1],y[j],t))/dx^2 + (u(x[i],y[j+1],t) -2*u(x[i],y[j],t)+ u(x[i],y[j-1],t))/dy^2 

so, we look now to the previous equations ( system of ODEs) as system of ODEs, at each position x[i], y[j], I think we can apply RK4

​​​​​​​

@Zeineb

strictly positive if (x,y,z) different to  (log(2)/4 , log(2)/4, log(2)/4) 
so in this case i can say, the (log(2)/4 , log(2)/4, log(2)/4)  is strict global minimizer

why its a strict global minimizer  , which argument allows us to say that this point is strit global minimizer 

@Axel Vogt 

strictly positive if (x,y,z) different to  (log(2)/4 , log(2)/4, log(2)/4) 
so in this case i can say, the (log(2)/4 , log(2)/4, log(2)/4)  is strict global minimizer 

@Carl Love 

Thank you for your message

Comparing The value of the sixth iteration between maple and https://planetcalc.com/7748/

There is a big difference between them.

Which value of the sixth iteration can be taken as result if we want an approximate root after six iteration

Thank you 

@dharr 

Please try this code, 
I get always undefined integrals 

compute_integral.mw

@dharr 

unfortunately,  the code give me undefined integral 

Moreover I tried to comoute 

int ( (x-1)*sin(log(x)),x=0..2) 

always undefinite integrals

 

@tomleslie 

I use the codes from 
http://www.maths.qmul.ac.uk/~wj/MTH5110/notes/MAS235_lecturenotes1.pdf
about Wieldand deflation 

Remark: 
I change the input matrix A
from 

A := Matrix(3, 3, [[1, 2, 1], [1, 2, 1], [1, 1, 2]]);

to 

A := Matrix(3, 3, {(1, 1) = 2, (1, 2) = 1, (1, 3) = 1, (2, 1) = 1, (2, 2) = 2, (2, 3) = 1, (3, 1) = 1, (3, 2) = 1, (3, 3) = 2})

the code seems to work. 

What is the difference between the two definitions of matrices. 
But I obtain 
HFloat(HFloat(undefined))
What does this  mean HFloat(HFloat(undefined))

@tomleslie 

thak you, 
i try to solve the zero eigenvalue problem...
In PW can i display a table contains all iterations, that is a table with three colunms : iteration, eigenvalues and corresponding eigenvectors

 

@tomleslie 

running the code using your modification I get 

Error, (in PW) bad index into Vector
 

 

@tomleslie 

Fixing in my  code Nx=400 , Nt=500 
I get 

Warning, solution did not converge within 200 iterations
 

what happen!!!

 

@tomleslie 

Thank you, for your comments. 

According to your code, the solution  ( analytic) from 10 is close to the numeric solution. 
I tested both with the solution obtained from finite difference ( Crank Nicholson finite difference). 
But, at endpoints, there is small oscillation...I feel that there is someting wrong ( in my code) but all matrices are correct, rhs is correct, CG is corrected. 

@Carl Love 

Thank you for this remark. I appreciate always your remarks.
If I change the time step and spacestep in my code, the solution behaviors change comppletely...moreover, 

I tested both at t=0.49, there is a strange phenomena at the end of interval...
All matrices introduced are correct....
But, I cannt understand what happen...

New_code.mw

@Carl Love 

Thank your for your comments
When I plot using your line code, I get the x-axis from 1 to 11 

But, U(x,t), is function with x from 0 to 1 
How, can I get my original  x-axis limits


 

1 2 3 4 5 6 7 Page 1 of 8