Maple 2017 Questions and Posts

These are Posts and Questions associated with the product, Maple 2017

Dear Users,

I am solving a large system of linear equation with the Hybrid solver. Up to 2400 equations, I get a solution, but if I change the number of equations to 3000, I don't get any solution in fact solution entry reads Float(undefined). All the entries in matrix and vector are floating point decimal with 32 digits of accuracy. Any idea how to overcome this?

 

thanks.

 

i attach my file

maple_pita_he.mw

Suppose I have

solution:=fsolve(f(x,y)=0,x,y)

this returns 

x=<result>, y=<result>

I want to continue the computation in my worksheet by assigning values to x and y without copying the numerical values by hand.

x:=<result>

y:=<result>

Then I want to make more computations with x and y.

It is too time consuming to copy the numbers by hand each time I run the worksheet

Larry

 

 

And y

In the following case evalhf Int not working. Please help

 

evalhf.mw

Having problems with solving PDE with symbolic BCs. 

u(x,y,t,M,A); 

 M,A,x are constants for this problem. 

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>Code Starts

pde := diff(u(x, y, t), t)-.5*(diff(u(x, y, t), y, y))-A*sin(M*x-t) = 0

bc[1] := u(x, 0, t) = 0

bc[2] := u(x, 10, t) = A*sin(M*x-t)

sys := [pde, bc[1], bc[2]]

pdsolve(sys)

>>>>>>>>>>>>>>>>Code ends

I don't get any solution after this.
Moreover, in the second BC, I would like to change 10 to inifnity. 

Thank you in advance for your help. 

Hello,

I have a matrix of size m*n and I want to apply a procedure "f" to each entry of the matrix. But I want to do this in parallel to reduce the computation time.

I used: Matrix(n, m, (i,j) -> Grid:-Seq( f (M (i,j) ) ,i=1..n, j=1..m) ); 

but I'm not satisfied with the result, I want the calculation to be faster. Are there any other methods?

Hi, how can you in maple take the derivitve of a function that consists of sum terms in it? (preferable in document mode)

For example I have this expression (from a math book):

f = N+k*(sum(ln(x__i-B), i = 1 .. N))-N*k*(sum((x__i-B)^k*ln(x__i-B), i = 1 .. N))/(sum((x__i-B)^k, i = 1 .. N))

What I then want to do is to derive this function with respect to k.
However just writing the expression like above it seems like mable doesn't keep the summation terms but evaluates them in a sense. So not sure how to set it up correctly in order to make the derivitive.

Taking the derivitive of f with respect to k, the solution should give something like this:

 

 

I'm trying to plot a function involving exp but keep getting warnings.

How can i avoid this?

plot(2*cos(t)/sqrt((1+exp(-eps*t))*(4/a^2-1)))

but getting the warning message

"Warning, unable to evaluate the function to numeric values in the region; complex values were detected"

Hello

I have a series of plots saved in fig0 (fig0:=rtable(1..number_of_figures);).  I had them plotted using plot:-display(fig0) but I could not figure out how to remove the frame box that separates each figure nor how to control the space between them when using size.

 

An exaggerated example follows

Many thanks

Ed

 

 

Hello everyone

I try to solve the system of nonlinear equations, where three variables are inside of integrals, for different values of the real parameter q.

It seems that  not for all values of q the system has a solution because I substitute different q but the function fsolve does not give any numerical answer or the special message even after the long evaluation. 

Here the code:

restart;
q := 70;
k0 := 100; n := 3; r := 1.1; t := 0.1e-2; Eg := n/((n+1)^(3/2)+1)^(2/3); kF2 := (1/((n+1)^(3/2)+1))^(1/3);
R1 := int(a^2*tanh(sqrt((a^2-mu)^2+d1^2)/(2*t))/sqrt((a^2-mu)^2+d1^2), a = 0 .. k0);
R2 := int(a^2*tanh(sqrt((a^2-mu+Eg)^2+d2^2)/(2*t))/sqrt((a^2-mu+Eg)^2+d2^2), a = 0 .. k0);
R3 := int(a^2*(1-(a^2-mu)*tanh(sqrt((a^2-mu)^2+d1^2)/(2*t))/sqrt((a^2-mu)^2+d1^2)), a = 0 .. k0);
R4 := int(a^2*(1-(a^2-mu+Eg)*tanh(sqrt((a^2-mu+Eg)^2+d2^2)/(2*t))/sqrt((a^2-mu+Eg)^2+d2^2)), a = 0 .. k0);
Eq1 := evalf(k0+k0*(r-1)-(1/2)*Pi*r*kF2*q-R1);           
Eq2 := evalf(k0-(1/2)*Pi*kF2*q-R2);
Eq3 := evalf(2/3-R3-R4);
fsolve({Eq1, Eq2, Eq3}, {d1, d2, mu});

I know that this system has the solution for some values of q but why I can't get the solution or the answer using fsolve?

Thank you in advance.

 

Update. I apologize, I made some errors in expressions R2 and R4. I have corrected the question and the code. But the problem is still unresolved.

I'm working on several worksheets where I solve numerical DE's. I would like to compare the solutions by plotting in one graph So I though it would be nice to have a seperate worksheet for this.

My approach:

Statements from my original sheets:
> solution:=dsolve({ODES,ICS},maxfun=0,numeric,range=0..10,output=listprocedure):
> X__br:=eval(xbr(t),solution):


I can plot these variables in my original sheet with plot(X__br(t),t=0..10).
However, when I transfer it to a different sheet by:

> save X__br, "filename.mpl"

And then load it into a new sheet by
> read("D:/.../filename.mpl");

There seems to be no possible way to plot the X__br(t) anymore. How can I solve this?
My error when I try plot(X__br(t),t=0..10) is:

Warning, unable to evaluate the function to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct

Hi

I want to create a Heaviside function called MyStep() which will behave exactly like the built in Heaviside with one exception: for MyStep(0) it will return 1 instead of undefined.

 

MyStep(t) = 0, 0<t

MyStep(t) = 1, else

 

Thanks

I have this equation but maple solve root is 2

Root_eq.mw

Root is 4 x1 =1, x2= 8.95006470,

x3 =0 .6939575785

x4 = -0.6440222825

 

Hello, for an assignment I was given the task of iteratively calculating the water depth of a flow using Newton's method. For this I tried to create a procedure wich uses a number of input values. The code is listed below;

 

restart;
Newton := proc (n, y0, Q, b, m, k, S0) local A, P, Sf, y, F, dAdy, dPdy, Fdiff, i; global ylist; y[0] := y0; for i from 0 to n do A[i] := (b+m*y[i])*y[i]; P[i] := b+2*y[i]*sqrt(1+m^2); Sf[i] := Q*abs(Q)*P[i]^(4/3)/(k^2*A[i]^(10/3)); F[i] := S0/Sf[i]-1; dAdy[i] := b+2*m*y[1]; dPdy[i] := 2*sqrt(1+m^2); Fdiff := (2/3)*(F[i]-1)(5*dAdy[i]/A[i]-2*dPdy[i]/P[i]); y[i] := procname(evalf(y[i]-F[i](y[i])/Fdiff[i](y[i]))) end do; ylist := [seq(y[i], i = 0 .. n)]; return ylist end proc;

Newton(10, 1, 5, 12, 1, 30, 0.1e-4);
Error, (in Newton) invalid input: Newton uses a 2nd argument, y0, which is missing

 

As you can see, I get an error referring to the second argument y0, which is the starting value of the calculation. The error says the argument is missing, however it is right there in the brackets of the Newton procedure (along with the values of all other parameters). I have tried explicitly stating that y0:=1, and changing the name of the parameter, however that didn't help.

Am I missing something really simple, or is there something wrong with my code?

Thanks in advance.

I find the 2D math input in Maple to somewhat cumbersome for various expressions.
Specifically, I have a function f(z) = z^2, with w = f(I x + y) where I is the imaginary number.

I typed the line in 2D math

plots[implicitplot]({Im(w) = 2, Re(w) = 2}, x = -5 .. 5, y = -5 .. 5, colour = {"Blue", "Red"})
Error, (in plot/color) invalid color specification: {"Blue", "Red"}

For some reason this does not work in 2D math, but in Maple-input it works as expected.

I recall from past use of Maple, that there were other problems as well with the 2D math input.
I know you need to be particular with the use of space. 

Are there other common pitfalls or "bugs" related to use of 2D math input ?

1 2 3 4 5 6 7 Last Page 2 of 32