MaplePrimes Questions

Hello Iam following this tutorial to solve pde with laplace transforms  but have a problem with eval which is not evaluating the following expression
restart;
with(PDEtools);
with(inttrans);

# Equations for c in physical space
PDE1 := diff(c(r, t), t) = K_1*diff(r*diff(c(r, t), r), r)/r;

#initial condition
ic1 := c(r, 0) = V

# Equation in Laplace space
PDEL1 := laplace((lhs - rhs)(PDE1), t, p);

# Apply initial condition to simplify
simplified_PDEL1 := eval(PDEL1*{ic1})

which is displayed (an treated) as

with c(r,0) not being replaced by V. When I try to solve the problem with dsolve I get the following error

Error, (in dsolve) invalid input: `PDEtools/NumerDenom` expects its 1st argument, ee, to be of type algebraic, but received {c(r, 0) = V}

If I replace manually C(r,0) by V then the error dissapears. Is this how eval is supposed to behave ?

Cheers,

Hello,

I need to work with the shapiro-wilks statistical test for the normaility of the population.

I remark that the precision of this test with Maple is not very good.

I try the same test with STATISTICA, STHDA and  XLSTAT. 

For p-value, I obtained 0.3478, 0.3439 and 0.348 with the 3 others softs and 0.4146 with Maple.

For the W, I obtained 0.986, 0.9825 and 0.983 with the 3 others and 0.9761 with Maple.

My sample has 80 elements, risk 0,05.

Is there anybody to explain this difference between the results and perhaps to confirm if it does exist a best method with Maple.

The test : 

pvalue2 := Statistics:-ShapiroWilkWTest(Mat2, level = 0.05, output = 'pvalue')
statvalue2 := Statistics:-ShapiroWilkWTest(Mat2, level = 0.05, output = 'statistic')

Thank you very much for help.

Hello,

I am trying to recover with maple the analytical solution of the problem of conduction within two composite cylinders given in Carslaw and Jeager's book: "Conduction of heat in solids" (link here). Here is my take on the problem

restart;
with(PDEtools);
C := diff_table(c(rho, t));
E := diff_table(e(rho, t));
PDE1 := diff(C[], t) - K_1*(diff(diff(C[], rho), rho) - diff(C[], rho)/rho) = 0;     
PDE2 := diff(E[], t) - K_2*(diff(diff(E[], rho), rho) - diff(E[], rho)/rho) = 0;       

ic1 := eval(C[], t = 0) = V;
ic2 := eval(E[], t = 0) = 0;

bc_1 := eval(C[], rho = a) = eval(E[], rho = a);
bc_2 := K_1*eval(diff(C[], rho), rho = a) = K_2*eval(diff(E[], rho), rho = a);
bc_3 := eval(E[], rho = infinity) = 0;
bc_4 := (diff(C[]/rho, rho), rho = 0) = 0;
pdsolve([PDE1, PDE2],[ic1,ic2, bc_1,bc_2,bc_3,bc_4]); 

Unfortunately I end up with the following errors:

Error, (in pdsolve/sys) too many arguments; some or all of the following are wrong: [{c(rho, t), e(rho, t)}, [c(rho, 0) = V, e(rho, 0) = 0, c(a, t) = e(a, t), K_1*(diff(c(a, t), a)) = K_2*(diff(e(a, t), a)), e(infinity, t) = 0, ((diff(c(rho, t), rho))/rho-c(rho, t)/rho^2, rho = 0) = 0]]

If I call pdsolve without any initial and boundary conditions, I have the general form of the equation which is correct (product of exponential function in time with Bessel functions for space) but I don't know how to determine the coeficients with maple from there.

 

Note also that the boundary condition "bc_2" does not seem to be correcty evaluated (it is supposed to specify the continuity of the flux ar r=a). Instead it just evaluate the expression with r swapped with a. If one write the same line of code with r=0 instead of r=a then the evaluation seems correct.

Any help would be very appreciated,

Cheers

Hello,

I have a problem with the type of the pvalue in the Shapiro-Wilks test.

My program :

pv := ShapiroWilkWTest(Mat1, level = 0.05);
whattype(pv);  list  
eval(pv[2]);  "pvalue = 0.25..."  This result is an element of a list but not a real number

I would like to obtain the real value of pvalue in order to make a calulous with it.

I have tried as an example in Maple :

pv := ShapiroWilkWTest(Mat1, level = 0.05,output=pvalue); but it doesn't run.

May someone help me? Thank you very much
 

I solved the differential equation using 'dsolve' and Maple returns it with fiver possible solutions. How can we get the single possible solution for w(x) if we assume c, g (constants) are positive? Also, can we convert JacobiSN() to a simple trigonometric or algebraic function?

restart

with(DEtools)

``

q := (1/2)*(diff(w(x), x))^2+(1/8)*w(x)^4-(1/2)*c*w(x)^2-g = 0

(1/2)*(diff(w(x), x))^2+(1/8)*w(x)^4-(1/2)*c*w(x)^2-g = 0

(1)

dsolve((1/2)*(diff(w(x), x))^2+(1/8)*w(x)^4-(1/2)*c*w(x)^2-g = 0, {w(x)})

w(x) = (2*c+2*(c^2+2*g)^(1/2))^(1/2), w(x) = (-2*(c^2+2*g)^(1/2)+2*c)^(1/2), w(x) = -(2*c+2*(c^2+2*g)^(1/2))^(1/2), w(x) = -(-2*(c^2+2*g)^(1/2)+2*c)^(1/2), w(x) = 2*JacobiSN((1/2)*(-2*c+2*(c^2+2*g)^(1/2))^(1/2)*x+_C1, ((c*(c^2+2*g)^(1/2)-c^2-g)*g)^(1/2)/(c*(c^2+2*g)^(1/2)-c^2-g))*g/(g*(-c+(c^2+2*g)^(1/2)))^(1/2)

(2)

``

``

Download solve.mw

Hello,

I have a problem to export datas in an excel file.

I have no problem to read some datas in this file, but when i want to write a matrix 1x1 in a cell, there is no error message but nothing happen in the file.

Here is my program :

with(ExcelTools);

kernelopts(datadir);

File1 := FileTools:-JoinPath(["Excel", "test.xlsx"], base = datadir);
Mat1 := Import(File1, "Somme", "G2:G8"); # it runs very well
R := array(1 .. 1, 1 .. 1, [[564]]);
Export(R, "test.xlsx", "Somme", "G1"); # nothing happens in the file

Thank you very much for help

Hello everyone, 

I have a function C that depends on Omega and mu_s values. I am trying to get a 3d plot of C for certain Omega and mu_s values. First, I got the graph for Omega=0.1..10, mu_s=0.1..0.6 (red plot). Then, for Omega=0.1..50, mu_s=0.1..0.6 (green plot). In the second case, I expected the first part of the graph to be the same as before, but with values of C for Omega till 50. However, the first part of the plot changes as well. I do not understand why. Can someone help me with it, please?

I would really appreciate it! 

Thank you!!

mint gives messages such as

 These local variables were assigned a value, but otherwise unused:  i

even though it does say what proc this is in, it does not give the line number where such problem is at.

So if a proc is long, say 100 or 200 lines, it is very hard to find the location of such things visually all the time.  Searching for "i" is not too useful.

Tried different options but there are no line numbers given for these messages.

"C:\Program Files\Maple 2022\bin.X86_64_WINDOWS\mint.exe" -i 2  foo.mpl

Using  -i 4 gives much more information, but no line numbers.

Are there other things to try? I think mint should be improved and list line number for each warning and message such as also These local variables were assigned a value, but otherwise unused: 

It should give lines numbers where this happened to make it easier to locate in the editor.

Maple 2022.1 windows 10.

 

Assalomu alaykum. 

I couldn't solve this integral equation but other online calculator done it. How to calculate in Maple. I use Maple 2021.

L[1, 0] := t + Pi*t/2 + (4*t^(3/2))/3;
L[2, 0] := t^(1/2) + Pi*t/4;
L := int((L[1, 0] + L[2, 0])/(x - t)^(1/2), t = 0 .. x);
 

Is it possible to integrate eq (1) in such a way that the final result will be of 1st order differential equation? 

 


 

restart

with(PDEtools)

eq := (diff(U(z), z))^3*(diff(U(z), z, z))+(diff(U(z), z))*(diff(U(z), z, z, z, z))-(diff(U(z), z, z))*(diff(U(z), z, z, z)) = 0

(diff(U(z), z))^3*(diff(diff(U(z), z), z))+(diff(U(z), z))*(diff(diff(diff(diff(U(z), z), z), z), z))-(diff(diff(U(z), z), z))*(diff(diff(diff(U(z), z), z), z)) = 0

(1)

eq1 := map(convert, eq, diff); eq2 := map(int, lhs(eq1), z)-C1 = 0

(diff(U(z), z))^3*(diff(diff(U(z), z), z))+(diff(U(z), z))*(diff(diff(diff(diff(U(z), z), z), z), z))-(diff(diff(U(z), z), z))*(diff(diff(diff(U(z), z), z), z)) = 0

 

(1/4)*(diff(U(z), z))^4-(diff(diff(U(z), z), z))^2+(diff(diff(diff(U(z), z), z), z))*(diff(U(z), z))-C1 = 0

(2)

``


 

Download inttegration.mw

Hello everybody,

Something totaly unexpected came by, and i was wondering: how could this be? Im putting what would be the same input in, and yet, its not giving me the results i was expecting for the input i had itterated. 

While one solution would be really cumbersome and slow, it tried to do it faster. It worked before, but now i hit a wall. No clue why, but it seems to be so. 

Here is the example:

 

restart

stelsel := {-x1+7*x2+3*x-x5 = -7, 2*x1+3*x2+4*x3-x5 = 10, 5*x1-3*x2+2*x3-x4-2*x5 = 8}

{-x1+7*x2+3*x-x5 = -7, 2*x1+3*x2+4*x3-x5 = 10, 5*x1-3*x2+2*x3-x4-2*x5 = 8}

(1)

solve(stelsel*{x1, x2, x3, x4, x5})

Error, (in testeq) invalid arguments

 

restart

stelsel := {-x[1]+7*x[2]+x[3]-x[5] = -7, 2*x[1]+3*x[2]+4*x[3]-x[5] = 10, 5*x[1]-3*x[2]+2*x[3]-x[4]-2*x[5] = 8}

{-x[1]+7*x[2]+x[3]-x[5] = -7, 2*x[1]+3*x[2]+4*x[3]-x[5] = 10, 5*x[1]-3*x[2]+2*x[3]-x[4]-2*x[5] = 8}

(2)

solve(stelsel, {x[1], x[2], x[3], x[4], x[5]})

{x[1] = 17/3+(4/3)*x[2]-x[3], x[2] = x[2], x[3] = x[3], x[4] = 53/3-(23/3)*x[2]-7*x[3], x[5] = 4/3+(17/3)*x[2]+2*x[3]}

(3)

``

Thank you!

Greetings,

The Function

Download Mapleprimes_Question_Book_2_Paragraph_4.2.2.mw