## tutor needed for maple soft...

Hello i need a tutor to help me with  Numerical analysis on Maple and the programming part. Im In UAE but we can do this online as well

## Error in resluts...

Hello,

I am working with numerical function with two indices, such as f[i,j], where i,j run over 1 to N, where N is n integer number.

The resluts stored in vector colummn for each value of j. i.e.

for each j=1,     G1:=Vector[column](N,i-->f(i,1))

for each j=2,     G2:=Vector[column](N,i-->f(i,2))

and so on.

The procedure is working for the first value j=1.

for the second value the following message appear

{--> enter Terminate, args =
{--> enter Terminate, args =
<-- exit Terminate (now in Terminate) = }
<-- exit Terminate (now at top level) = }

## Spin Glass - Sherrington Kirpatrick Model: Boundar...

Hi, i try resolve this equations numerical for the boundary between the spinglass and ferromagnetic phases:

how?

Regards.

## Numerical solution of three-point differential equ...

Hello! Hope everything fine with you. I am try to solve the three-point differential by numerical method in attached file but failed. Please see the attachement and solve my problem. I am very thankful your kind effort. Please take care.

three-point.mw

With my best regards and sincerely.

School of Mathematical Sciences
Peking University, Beijing, China

## how to solve the challenging non linear coupled 1s...

G := 6.6743*10^(-8);

a := 1.9501*10^24;

b := .3306;

c := 2.99792458*10^10;

d := 2.035;

pi := 3.143;

eps := 3.8220*10^35;

g(r) = 1-s(r)/0.06123;

j(r) = e^(-(1/2)*w(r))*(1-2*G*v(r)/(r*c^2))^.5

sys := diff(v(r), r) = 4*pi*r^2*eps/c^2, ics=v(0)=0

diff(u(r), r) = -G*(eps+u(r))*(v(r)+4*Pi*r^3*u(r)/c^2)/(c^2*(r^2-2*G*r*v(r)/c^2)),u(0)=1.3668*10^34

diff(w(r), r) = 1.485232054*10^(-28)*(v(r)+4.450600224*10^(-21)*pi*r^3*u(r))/(r^2-2*G*r*v(r)/c^2), conditions: w(0)=0,iterate it to find w(688240)=-2.05684, it solve must satistfy the both conditions.

diff(r^4*j(r)*(diff(g(r), r)), r)+4*r^3*g(r)*(diff(j(r), r)) = 0, conditions dg(r)/dr =0  at r=0, g(688240) =0.87214

diff(J(r), r) = (8*pi*(1/3))*(eps/c^2+u(r)/c^2)*(g(r)*j(r).(r^4))/(1-2*G*v(r)/(r*c^2)) condition J(0)=0.

## Method for numerical solving BVP of ODE with disco...

I try to solve numerically a boundary VP for ODE with different order of discontinuity of right part.

Say, the following BVP is given:

y''(x)+y'(x)+y(x)=F(x)

y(0)=1, y(2)=1

Let's use piecewise right part

F  := piecewise(x<=1, -x, x>1, 2*x+(x-1)^2)

The function

piecewise(x<=1, 1-x, x>1, (x-1)^2)

as obviuos, satisfies the BVP exclung the point x=1, where its 1st and 2nd derivatives are discontinuos.

Numerical solution

N0:=6:
As:=dsolve([diff(y(x), x\$2)+diff(y(x), x)+y(x)=F,  y(0)=1, y(2)=1], y(x), type=numeric, output = Array([seq(2.0*k/N0, k=0..N0)]), 'maxmesh'=500, 'abserr'=1e-3):

provides the solution essentially different to exact one described above:

But if to use the right part

F := piecewise(x<=1, x^2+x+2, x>1, -x^2+x)

for which the function

piecewise(x<=1, 1-x+x^2, x>1, -1+3*x-x^2)

satisfies the BVP excluding x=1, where this function has discontinuity of 2nd derivative only, the corresponding numerical solution is very similar to this exact solution:

This reason of the difference between these two cases is clear. In the first case both 1st and 2nd derivatives are discontiuos, while in the second one -- 1st derivative is contiuos.

I wonder, if there are numerical methods, implemeted in Maple, for numerical solution of the first type BVP with non-smooth right part?

## How do I solve a system of singular differential e...

Please help me to solve the system of 1st order singular O.D.E  (see uploaded file)....New_Microsoft_Office_Word_Document.docx

## solving numerical numerical equations in a specifi...

Hello,

I have to solve numerical trogonometric equations such as :
solve(.3707752782+.1499320455*sin(theta[4](t))+.1117559025*cos(theta[4](t))=0.5,theta[4](t));

But, after, I would like to keep only the solution defined in a specific interval such as : [0,Pi]

1) Is there a possibility to define options with the function solve to limit the solutions belonging to a specific interval ?

2) Otherwise, may you help me to make an systematic process to choose a solution in a specific interval ?

Thank you for your help

## Iterative Gauss-Seidel...

I am trying to solve a matrix system to find the relative arrival rates of a queueing network using Gauss-Seidel.The maple commands are below:

restart;
with(Student[NumericalAnalysis]); with(LinearAlgebra);

A := Matrix([[1, -.333, -.333, -.333], [0, 1, -.333, -.333], [0, -.333, 1, -.333], [0, -.333, -.333, 1]]);

IsDefinite(A, 'query' = 'positive_semidefinite');

true

b := Vector([1, 1, 1, 1]);

IterativeApproximate(A, initialapprox = Vector([1, 1, 1, 1]), tolerance = 10^(-3), maxiterations = 20, stoppingcriterion = relative(infinity), method = gaussseidel);

Error, (in Student:-NumericalAnalysis:-IterativeApproximate) check that the augmented matrix has the correct dimensions

I do not understand this error as the matrix is 4x4 as shown. Can anyone see where I went wrong?

## Numerical integration hangs...

Hello Mapleprime users

I am having an issue with a numerical integration calculation. I have a large(ish) polynomial integrand and need to apply two integrations which I am using the _cuhre method for. See attached the minimum working example file.

Numerical_integration_HF.mw

Firstly some simplifications are done to the integrand and then a basic for loop which calculates the integration for r from 0 to 20 in steps of 0.1. The issue occurs when the loop hits r~2.5 (on my machine, Maple 2015, i5, 16GB ram). Up to that point the calculation is steady with the following stats per point calculated:

memory used=87.59MiB, alloc change=0 bytes, cpu time=3.45s, real time=3.15s, gc time=439.16ms

Then when the calculation gets to ~2.5 it just hangs and will not calculate past it. Any ideas as to what is going on here?

Any help would be appreciated with this issue.

Thank you in advance

Yeti

## 3D Numerical Integration...

Hi, Maple community

I am trying to integrate a 3D data numerical set. I managed to execute an array interpolation algorithm and apply it to plot a smooth surface but I do not know how to integrate it numerically. I want to be able to integrate the data not only in its domain but also in sub-domains for multiple purposes.

I've found here a topic about it and tried to apply suggestions made with no success.

Here I copy the worksheet steps:

restart:
with(LinearAlgebra):
with(CurveFitting):
with(plots):

Initial Parameters

Nx:=8;    Points in the x direction
Nz:=6;    Points in the z direction
Lx:=3;    This means x goes from 0 to 3
Lz:=2;    This means z goes from 0 to 2
Delta[ze]:=evalf(Lz/(Nz-1));
Delta[xe]:=evalf(Lx/(Nx-1));

DataPn:=Matrix(Nx,Nz,0):         Matrix to store values in the 3rd direction

The following step is a function that I used to simulate data that I will later on will get by measurings.

for i from 1 to Nx do
for j from 1 to Nz do
DataPn[i,j]:=evalf(sin(Pi*(i-1)*Delta[xe]/Lx)*sin(Pi*(j-1)*Delta[ze]/Lz)):
end do;
end do;

Setting data to use ArrayInterpolation

datax:=Array([seq((i-1)*Delta[xe],i=1..Nx)]);
dataz:=Array([seq((j-1)*Delta[ze],j=1..Nz)]);

In this step here, I don't really understand what this argument [[a],[b]] means but ArrayInterpolation cannot work without it.

MI:=(a,b)->ArrayInterpolation([datax, dataz],Array(DataPn),[[a],[b]],'method' = 'spline')[1,1];

Plot and display the interpolation and the real function to compare the quality of the interpolation, actually it does an excellent job, at least with this data.

G1:=plot3d(MI, datax[1]..datax[Nx], dataz[1]..dataz[Nz],labels=[x,z,Pn]);
G2:=plot3d(evalf(sin(Pi*x/Lx)*sin(Pi*z/Lz)),x=0..3,z=0..2,color=red);
display(G1,G2);

And finally I found this integration method here in mapleprimes

evalf(Int(x->evalf(Int( y->MI(x,y), 0..3,method=_d01akc)),0..2,method=_d01akc));

And the result is 1.102279199. I thought maybe I was setting wrongly the integration limits or the order in the command but in any case the result was near the analytic case which was:

int(evalf(sin(Pi*x/Lx)*sin(Pi*z/Lz)),x=0..3,z=0..2);

2.431708408

In this scenario I know the result is wrong because I can compute the exact solution, but later on I won't be able to do so. Also, later I'm interested in the integration, let's say, x from 0..0.5 and later from 0.5..1 and so on (keeping z always from 0 to 2) So, the main questions are:

1. Am I setting something wrong?
2. If I delete the method option in the integral, it takes a lot of time for the program to compute any result. Why?
3. Is there any other way to integrate this? I mean, any other way to write the command to compute the integral.
4. What does the [[a],[b]] argument stands for in ArrayInterpolation?

Regards and thanks for your help.

## Numerically solving parametric integral...

Hello everyone,

I am trying to solve numerically int( f(t,z) , t=0..T ) = 0 , in z for a cumbersome f.

I tried z1=fsolve( int( f(t,z) , t=0..T ) = 0 , z). But then I tried int( f(t,z1) , t=0..T ) and the result is clearly not zero nor anything small.

It looks like Maple evaluates analytically the integral, and does it wrong (check this for more details) so fsolve uses the wrong equations.

Anyone knows how I can force Maple to evaluate numerically the integral at each step of the fsolve function?

Thank you!

## About numerical parameters...

I am solving a complicated ODE and I would like to know if there is a way for Maple to output the ODEs without doing any numerical substitutions for known parameters. Say one of my parameters, call it P, is initialized (there are many more but Ill just simplify and consider one here) to a value of 10. In order to chekc that I have coded the ODEs correctly it would help me if Maple does not substitue with the numerical value 10 for P when displayng teh ODEs, but rather keeps P, as a parameter. Is there a way to achieve this?

## Numerical evaluation of integrals...

Hi all,

I'm trying to perform some calculations containing exponential integrals. Here is a snippet of my code:

restart;

H:=0.5:

q[0]:=10^5:
Es := 4*10^9:

p[0]:=10^6:
q[s]=10^10:

C := (q) -> q^(H+1.5):

G := (q) -> (int(q^3*C(q), q = q[0] .. q)):
P := (q) -> 1/sqrt(G(q)):

p := (xi) -> p[0]/P(xi*q[0]):
w:= (q,xi) -> 1/(Pi*(int(C(qs)*qs^3, qs = xi*q[0] .. q)))^(1/2):

U := (xi) -> (int(q*C(q)*w(q,xi)*(Int(exp(-(w(q, xi)*ps/Es)^2)/ps,ps=p(xi)..infinity)),q=xi*q[0]..q[s])):

My objective is to evaluate U for a set of discrete values of xi for further processing e.g. visualisation via plots. Neither value(U(xi)) nor evalf(U(xi)) produces a numerical result so I keep searching for solution. Does anybody have an advice how to solve U?

Regards, lassa