Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

The following is the PDE I need to solve.

(x*y+1)*(diff(h(x, y), y, y, y))+(x+h(x, y))*(diff(h(x, y), y, y))-(diff(h(x, y), y))^2+k(x, y) = 0, (10.*(x*y+1))*(diff(k(x, y), y,y))+(10.*x+h(x,y))*(diff(k(x, y), y))-(diff(h(x, y), y))*k(x, y) = 0

 

This is the original boundary condition:

h(0, y) = f(y), h(x, 0) = 0, k(0, y) = g(y), k(x, 0) = 1, k(x, 25) = 0, (D[2](h))(x, 0) = 0, (D[2](h))(x, 25) = 0

 

After using pdsolve it come out the error:

pdsolve(eval(pde2, P = .1), pdebc4, numeric, [h(x, y), k(x, y)], spacestep = .1)

Error, (in pdsolve/numeric/par_hyp) Incorrect number of initial conditions, expected 0, got 2

 

If I remove one of the boundary condition when x=0, maybe h(0,y)=f(y), then the error will be this:

Error, (in pdsolve/numeric/par_hyp) Incorrect number of initial conditions, expected 0, got 1

 

However if I remove both when x=0, it come out this error:

Error, (in pdsolve/numeric) initial/boundary conditions must be defined at one or two points for each independent variable

 

May I know what is the problem of this equations?

P/S: I know its only differentiate with respect to y and is consider to be an ODE( I need more explantion on this please) and I'm still new to maple. Thanks!!

 

The OrthogonalExpansions package is a collection of commands to compute one-dimensional and multi-dimensional orthogonal series expansions of a function. The expansions are evaluated symbolically, numerically or in an inert form.

In particular, the package includes six modifications of the one-dimensional Fourier series, as well the multi-dimensional Fourier, cosine and sine series, one- and multi-dimensional series expansions of classical orthogonal polynomials.


The package includes MixedSeries command to compute multi-dimensional mixed orthogonal series expansions. Mixed series are created from the one-dimensional and multi-dimensional series that are available in the package.


The package also includes GramSchmidtL2 command for computing symbolically or numerically an orthonormal set of one- and multi-variable functions.

 

int(exp(I*x(2-y)),[x=-infinity..infinity, y=0..2]);

how to calculate this integral? where I is imaginary part?

Hello

I would like to solve the two dimensional heat equation in the square [-1,1]^2  using finite difference.

The following code  does not gives me the right answer.

  I appreciate any help

 

 

 

heat2dequation.mw

Hello

I solved a complex PDE equation in maple but I can not plot the output.

The manner was like bellow:

PDE := [diff(A(z, t), z)+(1/2)*alpha*A(z, t)+(I*beta[2]*(1/2))*(diff(A(z, t), t, t))-(I*beta[3]*(1/6))*(diff(A(z, t), t, t, t))-I*(GAMMA(omega[0]))(abs(A(z, t))^2*A(z, t)) = 0];
IBC := {(D[2](A))(z, 1), A(0, t) = -sin(2*Pi*t), A(z, 0) = sin(2*Pi*z), (D[2](A))(z, 0) = 2*z};
pds := pdsolve(PDE, IBC, type = numeric, time = t, range = 0 .. 1);
pds:-plot3d(A(z, t)*conjugate(A(z, t)), t = 0 .. 1, z = 0 .. 10, shading = zhue, axes = boxed, labels = ["x", "t", "A(z,t)"], labelfont = [TIMES, ROMAN, 20], orientation = [-120, 40]);

It is solved but there is an error like:

Error, (in pdsolve/numeric/plot3d) unable to compute solution for z>INFO["failtime"]:
unable to store 11.2781250000000+4390.00000040000*I when datatype=float[8]

could you please help me?

what is the problem?

 

 

Hi everyone, 

I seek for creating a discrete random variable with the following characteristics. Let i be an integer between 1 and 100. The random variable is an integer, among i-x, i-x+1, i-x+2..., i-1, i+1, i+2... i+x. For example, with i=20 and x=5, the random variable is an integer between 15 and 25; with i=23 (and again x=5), the random variable is an integer between 18 and 28; and with i=98, the random variable is an integer among 93, 94... 97 and then 99, 100, 1, 2, 3.

Each possible value has the same probability, that is, 1/2x.

Any tips? Thank you in advance.

I have a differential equation which it seems not be solvable. can anyone help me to solve?

Thank you

difeq.mw

I am trying to evaluate the following double integral where hypergeom([x,1/2],[3/2],C) is gauss hypergeometric function 2f1. maple gives back it unevaluated. I doubt it may be due to slow convergence of hypergeometric function. 
 

restart; x := (1/6)*Pi; evalf(int(evalf(int(cos(x)*hypergeom([x, 1/2], [3/2], sin(x)/(r*cos(x)+k-2*r*sin(x))^2)/(r*sin(x)^2+r*cos(x)+k)^4, k = 0 .. 10)), r = 1 .. 2))

Int(Int(.8660254040*hypergeom([.5000000000, .5235987758], [1.500000000], .5000000000/(-.1339745960*r+k)^2)/(1.116025404*r+k)^4, k = 0. .. 10.), r = 1. .. 2.)

(1)

``


 

Download DOUBLE_INT_2.mw

I have tried to compile a simple program looking for counterexamples to a conjecture by Goldbach that every odd number is a sum of a prime and twice a square. Stern gave the counterexamples 5777 and 5993 a long time ago, so this is mainly for instruction purposes.

My program

othergoldbachFCi:=proc(sieve::Array(1..10000,datatype=integer[4]))
   local i,j,M; 
   M:=10000;
   for i from 1 to M do
      if(sieve[i] mod 2=0) then 
         for j from 1 to iquo(M-i,2*i+1) do 
            sieve[i+j*(2*i+1)]:=2*iquo(sieve[i+j*(2*i+1)],2)+1;
         end do; 
         for j from 1 to floor(sqrt(M-i)) do 
            sieve[i+j*j]:=2+sieve[i+j*j] mod 2;  
         end do;
      else 
         if(sieve[i]<2) then 
            printf("%d is a counterexample\n",2*i+1); 
         end if; 
      end if; 
   end do; 
end proc;

works fine and compiles without problems. (I have to pass the array for the sieve because compiled program cannot declare memory, and it has to be 4 bytes even though I only need to use the lower 2 bit).  But the compiled version breaks with

   Error, (in compiledOGi) array index out of bounds

 

already in the first instance of the for loop. After a lot of trial and error I found out that if I replaced the line 

   sieve[i+j*j]:=2+sieve[i+j*j] mod 2;  

by

   temp:=iquo(sieve[i+j*j],2);
   sieve[i+j*j]:=2+(sieve[i+j*j]-2*temp);  

 

then the problem goes away and the compiled version works beautifully. It is not enough to do the mod 2 computation in temp, and not enough to replace mod by iquo in one line. 

This makes very little sense to me. Can anybody explain? I'm still using Maple 2016 and do not know if the issue has been resolved in Maple 2017.

 

Best,

Soren

 

 

The equation
                     -sqrt(k x) = sqrt(k x)
 is solved correctly by Maple:

solve(-sqrt(k*x) = sqrt(k*x));
                 {k = k, x = 0}, {k = 0, x = x}

However, the equation
                 -sqrt(k x) = sqrt(k x + k - 1)
 is apparently not solved correctly:

solve(-sqrt(k*x) = sqrt(k*x+k-1));

                         {k = 1, x = x}
The variable
                               x
 can not be arbitrary since this equation reduces to the former equation
-sqrt(k*x) = sqrt(k*x);
 when  k = 1
.

Maple should return something similar to (4) below.

eval(-sqrt(k*x), k = 1) = eval(sqrt(k*x+k-1), k = 1);
                          (1/2)    (1/2)
                        -x      = x    
solve({-x^(1/2) = x^(1/2)});
                            {x = 0}

Can this be explained in some way, or is this a bug?

Hi everybody,

I am presently developing a MAPLE-based application and I need to trace its evolutions through a “version control process”.
For codes written in other languages I use to use GIT (it acts with text files and it has syntactic coloring for different languages).

I suspect the development teams routinely face this version control issue.
Could you advise me,  on the versioning tools you use ?

Great thanks in advance

Let be the number z so that |z+3-2*I| + |z-3-8*I| = 6*sqrt(2). Find min and max of the modulus of z. How can I find min and max of modulus of z with Maple.

Thank for your help!

Hi every body,

I have a function "p(v,T)" which I evaluated its critical point. after calculating when I want to plot diagram of "p-v" for some values of "T" around critical value of "T" I expect the shape of diagram for "T" bigger and smaller than critical value of "T" be different. but it not happened. Are here anyone can help me? The function "p(v,T)" is in the file. if you want calculate critical point and check I am right or wrong. Thanks criticalpoint.mw


 

restart

eq := diff(y(t), t, t)+9*y(t) = Dirac(t)

diff(diff(y(t), t), t)+9*y(t) = Dirac(t)

(1)

with(inttrans):

icon := y(0) = 0, (D(y))(0) = 0;

y(0) = 0, (D(y))(0) = 0

(2)

dsolve({eq, icon}, y(t), method = laplace);

y(t) = (1/3)*sin(3*t)

(3)

dsolve({eq, icon}, y(t));

y(t) = (1/3)*(Heaviside(t)-1/2)*sin(3*t)

(4)

``


 

Download Dirac_for_Primes.mw

Hi,

I want to know is maple helpful to find a cjange coordinate to transform an old coordinate to a new coordinate? details are attached to the file:

changecoor.mw

Thanks guyz

First 944 945 946 947 948 949 950 Last Page 946 of 2215