MaplePrimes Questions

restart;
unames();  # first call ok
unames();  # second call


Error, invalid input: Typeset:-Kernel expects an equation for keyword parameter numericformatting

Error, unexpected result from Typesetting

 

Hi,

I want to define an operator P, which can shift the first subscript of u(i,j)

P: u(i,j)->u(i+1,j)

and similarly,

Q: u(i,j)->u(i,j+1)

I am not familiar with the commands in maple, please help!

Thanks.

I have a polynomial of 4th order and I wanted to use allvalues on the RootOf expression. It then says:
 

Error, (in evala/Normal/preproc) reducible RootOf detected.  Substitutions are {RootOf(4678560000000000000000000000000000000000+(16573041*CO^2+70122975000000000000*CO-623180900000000000000000000000000)*_Z^4+(-19887649200*CO^2-82987335000000000000000*CO+745755960000000000000000000000000000)*_Z^3+(5966294760000*CO^2+23851989000000000000000000*CO-221858784000000000000000000000000000000)*_Z^2+(417684600000000000000000000*CO-757598400000000000000000000000000000000)*_Z) = 600, RootOf(4678560000000000000000000000000000000000+(16573041*CO^2+70122975000000000000*CO-623180900000000000000000000000000)*_Z^4+(-19887649200*CO^2-82987335000000000000000*CO+...
Error, (in allvalues) numeric exception: division by zero

So apparently the expression is reducible but how do I do that?

I'm working with Fourier Transform. I'd like to transform a noisy image to the frequency domain, create a grayscale version of the spectrum, mask the dots or lines, threshold it, multiply the binary mask image with the magnitude image and then transform back to the spatial domain. Is this possible using Maple?

 

Any help would be appreciated.

I have a procedure, se, that takes 2 real numbers as arguments and returns a list of 3 real numbers,
so, for example,
se(1.2,2.7)=[-5.85,3.24,3.9].
(The exact nature of that procedure should not be important for plotting purposes.) 

The command   >plot3d(se(x,y),x=0..2,y=-2..3);  returns a surface plot as hoped.   
(I had some doubt because the help page suggests one needs 3 functions or procedures [f,g,h] to get a 3 d plot rather than one procedure that generates a list of 3 values but Maple 2017.3 came through). 
I have another procedure , td,that takes 2 real numbers as arguments and returns a list of 3 real numbers,  ;
so, for example,
td(2.7, 3.4)=[3.4, .594943507924521, -.111391393034295].

(Again, the exact nature of that procedure should not be important for plotting purposes.) 
The command   > plot3d(td(x,t),x=0..2,t=0..3);  returns the error message: 

Error, (in dsolve/numeric/process_parameters) parameter values must evaluate to numeric, got a = x

For some reason, plot3d is going back to the body of the procedure, td, rather than just accepting the values it provides.

Knowing that quotes can sometimes solve this sort of problem I then tried:
plot3d('td(x, t)', x = 0 .. 2, t = 0 .. 3);
only to get

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

I am not sure what plot3d is complaining about. The procedure I believe has all the information it needs in the form it needs it.
I then tried another workaround.

I set td1(x,t) :=td(x,t)[1], td2(x,t) :=td(x,t)[2], td3(x,t) :=td(x,t)[3] and tried :
plot3d([td1(x, t), td2(x, t), td3(x, t)], x = 0 .. 3, t = 0 .. 2);
to get
Error, (in dsolve/numeric/process_parameters) parameter values must evaluate to numeric, got a = x
Again, for some reason, plot3d is going back to the body of the procedure td.

Finally, I tried:
plot3d('[td1(x, t), td2(x, t), td3(x, t)]', x = 0 .. 3, t = 0 .. 2);
 
and I got the plot I wanted.

I am very happy to have a working file but I do not understand what worked and why. The nest time I have such a problem I will have to resort to the mysterious syntax manipulations again and hope that I hit on a combination that works.

For completeness I include the procedure bodies for  se and td below but I think that is irrelevant information.

se := proc (x, y) [x^2-y^2, x*y, x+y] end proc;


td := proc (x, tt)
local des, ff, fpfp; global ans;
ans(parameters = [a = x]);
des := ans(tt); ff := rhs(des[2]); fpfp := rhs(des[3]); [tt, ff, fpfp]
end proc;
 and
ans:=dsolve(ic,numeric,parameters=[a]):  where ic is an ode (I used several with the same result) with initial condition involving a.;

Can anybody explain what is happening?

 

How does one declare 3d vector in Maple, say p1, p3, and x, and integrate the following function from -Infinity to q, and q to + Infinity? Note that there is an iota in the exponential, and p1.x is the dot product of p1 and x

Integrate from -Infinity to q, q to infinity w.r.t. p1 and p3 

e^( - i p1 . x ) * 1/((p3 -p1)^2)

The integration should preferably be in spherical co-ordinates, but a demonstration in Cartesian co-ordinates would also be helpful. 

eqs := [D[1, 2](u)(x, y) = x+y, u(x, 0) = x, u(0, y) = y]:

pdsolve(eqs[1], u(x, y));
                       u(x, y) = _F2(x)+_F1(y)+(1/2)*x^2*y+(1/2)*x*y^2

pdsolve(eqs[1 .. 2], u(x, y)); # indeterminate
                       u(x, y) = invfourier((y^2*undefined+signum(y)*infinity+y*(limit(-(2*I)*Pi*y/s1,
                       s1 = 0))+undefined)*Dirac(s1)+2*Pi*(limit((I*s1+y)/s1, s1 = 0))*Dirac(1, s1), s1, x)

pdsolve(eqs, u(x, y)); # doesn't satisfy the DE
                       u(x, y) = (Int(1, tau1 = 0 .. y)+1)*(-_F1(0)+x-_F2(0)+y)

(value@eval)(eqs, u = unapply(rhs(%), [x, y]));
                       [1 = x+y, -_F1(0)+x-_F2(0) = x, (y+1)*(-_F1(0)-_F2(0)+y) = y]

The first pdsolve is fine, but not the other two.

how may i encounter this problem,

Please help me on this ode solve (dsolve) wit
 

restart

with(plots):

ps := 8933:

Eq1 := 8*(11-10*d)*(eta*(diff(f(eta), `$`(eta, 3)))+diff(f(eta), `$`(eta, 2)))/((1-phi)^2.5*(1-phi+phi*ps/pf))+4*f(eta)*(diff(f(eta), `$`(eta, 2)))+m*(1-4*(diff(f(eta), eta))*(diff(f(eta), eta))) = 0;

8*(11-10*d)*(eta*(diff(diff(diff(f(eta), eta), eta), eta))+diff(diff(f(eta), eta), eta))/((1-phi)^2.5*(1+7.958981045*phi))+4*f(eta)*(diff(diff(f(eta), eta), eta)) = 0

(1)

Eq2 := 2*knf*(eta*(diff(theta(eta), `$`(eta, 2)))+diff(theta(eta), eta))/(Pr*kf*(1-phi(eta)+phi*ps*cps/(pf*cpf)))+f(eta)*(diff(theta(eta), eta))-n*(diff(f(eta), eta))*theta(eta) = 0;

186.4367280*(eta*(diff(diff(theta(eta), eta), eta))+diff(theta(eta), eta))/(1-phi(eta)+.8253667629*phi)+f(eta)*(diff(theta(eta), eta)) = 0

(2)

Va := [.1, .1, .1]:

`Vφ` := [0.5e-1, 0.5e-1, 0.5e-1]:

etainf := 8:

bcs := f(a) = 0, (D(f))(a) = 0, theta(a) = 1, (D(f))(etainf) = 1/2, theta(etainf) = 0;

f(a) = 0, (D(f))(a) = 0, theta(a) = 1, (D(f))(8) = 1/2, theta(8) = 0

(3)

dsys := {Eq1, Eq2, bcs}:

for i to 3 do for h to 3 do phi := `Vφ`[i]; a := Va[h]; dsol[h][i] := dsolve(dsys, numeric, continuation = d); print(a); print(phi); print(dsol[h][i](0)) end do end do

Error, (in fproc) unable to store 'YP[3]' when datatype=float[8]

 

``


 

Download Grosan.mw

h bcs

Can any one help in coding.

diff(int(1/(1+exp(1/(x-t))), t = 0 .. x), x);
              diff(int(1/(1+exp(1/(x-t))), t = 0 .. x), t)

simplify(%);
                                  0

diff returns a derivative wrt the bound variable t.

This is probably tricky because diff needs to evaluate the limit of f(x, t) at t=x, and it must distinguish between the case of the left limit (x>0) and of the right limit (x<0).

 

f := x -> x+1:
fsolve('f(x)', x);
                          -1.000000000

f := x -> x+2:
fsolve('f(x)', x);
                          -1.000000000

It's easy to avoid this, sure, but this can be really confusing. And I think it's wrong that Maple fails to notice that the cached result is no longer valid.

Hello

I wonder how I could use maple to manipulate a symbolic matrix.  For instance, I need to calculate the transpose of the following matrix:

 

Matrix(2, 2, [[Transpose(X)+X-Q, A . X], [Transpose(X) . Transpose(A), Q]])

 

where X, Q and A are matrices of unknown (but compatible) size.  Of course, the main problem is how  X, Q and A should be defined to allow maple to calculate the transpose. 

Many thanks.

 

Ed

 

 

I am new to Maple and need assistance optomizing the following function F with respect to t:

F := int(f, [yip = -infinity .. infinity, xip = -infinity .. infinity, tp = 0 .. t])

Where: f := exp(-(xip^2+yip^2)*(1/2))*exp(-((2*Pe*tp+x-xip)^2+(y-yip)^2+z^2)/(4*(t-tp)))/((4*Pi^(3/2))*(t-tp)^(3/2))

and

Pe := 10; x := 0; y := 8/10; z := 1/18

 

I have a plot of F from 0 to approximately 1/2 and I know what the shape of the function is:

 

Is is clear that there definitely is a maximum within this range of t (i.e. t=0 to 1/2). When I right click on the function F and click the "Optomization" tab, then "Maximize (local)" maple results in the following pink text "Error, (in Optimization:-NLPSolve) integration range or variable must be specified in the second argument, got HFloat(1.0) = 0 .. HFloat(1.0)"

 

Any help fixing the error and optimizing the function F will be appreciated. Thank you!

I am trying to numerically solve y'=f(x,y) with y(0)=y0, where f is a solution to a PDE. In this case, f is a numeric approximation itself. I attempted to add this equation to the system of equations when finding f, but pdsolve will not accept an equation of this form. Then, in attempting to use f in dsolve, I get an error, stating that the input system must be an ODE system, found {y(x),f(x,y(x))}. 

 

Is there any way to use dsolve or pdsolve to generate y(x)? Or will I have to stick with using more classical methods like RK4?

Hello dearz.

Hope you will be fine with everything. I am facing in plotting the set of points like seq(u[i,20] $ i=1..25) in the attached file. Please see the problem and fix it. I shall be vary thankful. Waiting quick and positive response.

Help.mw 

First 913 914 915 916 917 918 919 Last Page 915 of 2428