MaplePrimes Questions

This is in matlab.  How can we do this in Maple?  Or what is the similar command fft2 in Maple?

Hi,

How do i set up a Fourth order Runge-Kutta, RK4, routine to solve this nonlinear second order differential equation?:


  • a=-2, b=1
  • k=0.1
  • x0=2
  • from t=0..100


Do you have any good examples that is similar to this problem?

thanks

 

So I encountered a Chini differential equation which is solvable in terms of an implicit function

restart; assume(nu > 2, beta > 0, lambda > 0, delta > 0, y >= 0);
simplify(dsolve(beta+y+(D(h))(y) = nu*((lambda+beta+y)^2-delta*h(y))^(1/2)));

The answer is really too ugly to be pasted here, but I do get a
RootOf [ linear + log(linear) + delta* some integral + 2 * the very same integral]

It took me a quarter of an hour to deciphre that the integrals are the same and that I could get it all down to (delta+2)*integral. Because Maple did not simplify it. 

But if I copy what is inside the RootOf(), and paste it into a simplify() - then it does! So how to force it into doing that in the first place? 

 

Still novice, yes ... 

Hello guys, I have a problem using simplex, at linear exercises.

Example:

> Typesetting[delayDotProduct](with, simplex, true);
> minimize (4*x1+3*x2+5*x3,{x1-2*x2+3*x3>=-1,x1+x2-x3>=1},NONNEGATIVE);

And I got an error:

Error, Got internal error in Typesetting:-Parse : "'_Inert_DELAYLESSEQ' is not a valid inert form"

How can I solve this? I'm new in Maple software. I'm using Maple15.

Thank you, have a nice day!

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.

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