MaplePrimes Questions

Hi all,

How to get the real and imaginary parts of this complex expression.

Thank you in advance

real_imag_parts.mw

Hello every one
I have a question!
My code starts with assuming the time variable (t) to be specified in a an interval for each time that the for loop executes as follows:

discontinuity := [0.403e-8, 0.45e-8, 0.478e-8, 0.55e-8];
 for j from 1 to 3 do
assume(discontinuity[j]<=t,t<discontinuity[j+1]);

After that the code runs and calculate every thing. For the second time, I mean for J=2, it does not work properly.
T[1] is the result of its first running (for j=1):
T[1]:=3.000023586*10^(-6)*exp(-4977.085344*t~)-1.325122648*10^(-6)*exp(-4.015800624*10^9*t~)
When it wants to evaluate this expression at specific time such as discontinuity[2] it cannot evaluate it. I tried to use unapply command to consider it as a function of t but it did not work. Here is the results:
AA:=simplify(eval(T[1], t = discontinuity[1]));
This is its result:        AA:=3.000023586*10^(-6)*exp(-4977.085344*t~)-1.325122648*10^(-6)*exp(-4.015800624*10^9*t~)
Without unapply command:    AA:=T[1]
Please answer my question.
Thank you so much
 

Hi, 

Here is the minimal situation that reveals which that could be a (little) bug in the MAPLE 2015 version of Explore.

In the attached file y is a list of numbers and val(r) a procedure that just print the value the rth element of y.
Changing the value of r is done with Explore (of course of no interest at all).
If I define the parameter r as a list ( r=[1..numelems(y)] ), only the value of y[1] is displayed: changing the value of r generates an error.
This doesn(t happen if r is defined as a slider ( r=1..numelems(r) ).

I discovered than the initial instance of Explore defines r as an integer while all the others (due to a change of r) define r as a string.
In the last command of the attached file you will see hjow I have circumvent this problem.

Is it a bug in Explore or does it exist some way to force the values of r to the implicit type they have in r=[$1..numelems(y)] ?

TIA

Download explore.mw

 

I'd like to solve this ODE

But not sure how to write it in Maple. In Mathematica, this is what I do

ClearAll[F, x, y, t];
ode = D[F[x[t], y[t]], x[t]]*D[x[t], t] + D[F[x[t], y[t]], y[t]]*D[y[t], t] == 0;
DSolve[ode, F[x[t], y[t]], {x[t], y[t]}]

and it gives

In Maple, I tried

ode:=diff(F(x(t),y(t)),x(t))*diff(x(t),t)+diff(F(x(t),y(t)),y(t))*diff(y(t),t)=0

Error, invalid input: diff received x(t), which is not valid for its 2nd argument

ode:=D[1](F)(x(t),y(t))*diff(x(t),t)+D[2](F)(x(t),y(t))*diff(y(t),t)=0;
dsolve(ode,F(x(t),y(t)))

Error, (in dsolve) expected the indeterminate function as, say, F(x) where x is of type "name" - and also cannot be a procedure name. Received: [F(x(t), y(t))]

 

What is the correct way to write this in Maple?

 

 

Hello,

I want to sort the formulae to Psi and Beta, but I don't know how it works. I have tried it with sort, simplify, isolate, but that isn't what I'm searching.

It should looks like the simplier formula in the picture.

 

ab := (diff(Psii(t), t, t))*J-l[f]*(F[s, f, l]+F[s, f, r])+l[r]*(F[s, r, l]+F[s, r, r])-(1/2)*b[r]*(-F[s, r, l]*delta[l]+F[s, r, r]*delta[r]) = 0;
  / d  / d         \\                                   
  |--- |--- Psii(t)|| J - l[f] (F[s, f, l] + F[s, f, r])
  \ dt \ dt        //                                   

     + l[r] (F[s, r, l] + F[s, r, r])

       1                                                      
     - - b[r] (-F[s, r, l] delta[l] + F[s, r, r] delta[r]) = 0
       2                                                      
bc := (diff(betaa(t), t, t))*m*v*betaa(t)+F[s, r, l]*delta[l]+F[s, r, r]*delta[r]-(diff(Psii(t), t)) = 0;
    / d  / d          \\                                   
    |--- |--- betaa(t)|| m v betaa(t) + F[s, r, l] delta[l]
    \ dt \ dt         //                                   

                               / d         \    
       + F[s, r, r] delta[r] - |--- Psii(t)| = 0
                               \ dt        /    
cd := (diff(betaa(t), t))*m*v+F[s, r, l]+F[s, r, r]+F[s, f, l]+F[s, f, r]-(diff(Psii(t), t)) = 0;
   / d          \                                           
   |--- betaa(t)| m v + F[s, r, l] + F[s, r, r] + F[s, f, l]
   \ dt         /                                           

                     / d         \    
      + F[s, f, r] - |--- Psii(t)| = 0
                     \ dt        /    
F[s, f, l] := c[fl]*alpha[fl];
                        c[fl] alpha[fl]
F[s, f, r] := c[fr]*alpha[fr];
                        c[fr] alpha[fr]
F[s, r, l] := c[rl]*alpha[rl];
                        c[rl] alpha[rl]
F[s, r, r] := c[rr]*alpha[rr];
                        c[rr] alpha[rr]
alpha[fl] := (-v*betaa-l[f]*(diff(Psii(t), t)))/(-v+(1/2)*b[f]*(diff(Psii(t), t)));
                                 / d         \
                 -v betaa - l[f] |--- Psii(t)|
                                 \ dt        /
                 -----------------------------
                        1      / d         \  
                   -v + - b[f] |--- Psii(t)|  
                        2      \ dt        /  
alpha[fr] := (-v*betaa-l[f]*(diff(Psii(t), t)))/(v-(1/2)*b[f]*(diff(Psii(t), t)));
                                 / d         \
                 -v betaa - l[f] |--- Psii(t)|
                                 \ dt        /
                 -----------------------------
                       1      / d         \   
                   v - - b[f] |--- Psii(t)|   
                       2      \ dt        /   
alpha[rl] := delta[l]+(-v*betaa+l[r]*(diff(Psii(t), t)))/(-v+(1/2)*b[r]*(diff(Psii(t), t)));
                                       / d         \
                       -v betaa + l[r] |--- Psii(t)|
                                       \ dt        /
            delta[l] + -----------------------------
                              1      / d         \  
                         -v + - b[r] |--- Psii(t)|  
                              2      \ dt        /  
alpha[rr] := delta[r]+(-v*betaa+l[r]*(diff(Psii(t), t)))/(-v-(1/2)*b[r]*(diff(Psii(t), t)));
                                       / d         \
                       -v betaa + l[r] |--- Psii(t)|
                                       \ dt        /
            delta[r] + -----------------------------
                              1      / d         \  
                         -v - - b[r] |--- Psii(t)|  
                              2      \ dt        /  


ab;
                             /
                             |
/ d  / d         \\          |
|--- |--- Psii(t)|| J - l[f] |
\ dt \ dt        //          |
                             |
                             \

        /                / d         \\
  c[fl] |-v betaa - l[f] |--- Psii(t)||
        \                \ dt        //
  -------------------------------------
             1      / d         \      
        -v + - b[f] |--- Psii(t)|      
             2      \ dt        /      

           /                / d         \\\        /      /      
     c[fr] |-v betaa - l[f] |--- Psii(t)|||        |      |      
           \                \ dt        //|        |      |      
   + -------------------------------------| + l[r] |c[rl] |delta[
               1      / d         \       |        |      |      
           v - - b[f] |--- Psii(t)|       |        |      |      
               2      \ dt        /       /        \      \      

                       / d         \\
       -v betaa + l[r] |--- Psii(t)||
                       \ dt        /|
  l] + -----------------------------|
              1      / d         \  |
         -v + - b[r] |--- Psii(t)|  |
              2      \ dt        /  /

           /                           / d         \\\          /
           |           -v betaa + l[r] |--- Psii(t)|||          |
           |                           \ dt        /||   1      |
   + c[rr] |delta[r] + -----------------------------|| - - b[r] |
           |                  1      / d         \  ||   2      |
           |             -v - - b[r] |--- Psii(t)|  ||          |
           \                  2      \ dt        /  //          \
       /                           / d         \\         
       |           -v betaa + l[r] |--- Psii(t)||         
       |                           \ dt        /|         
-c[rl] |delta[l] + -----------------------------| delta[l]
       |                  1      / d         \  |         
       |             -v + - b[r] |--- Psii(t)|  |         
       \                  2      \ dt        /  /         

           /                           / d         \\         \   
           |           -v betaa + l[r] |--- Psii(t)||         |   
           |                           \ dt        /|         |   
   + c[rr] |delta[r] + -----------------------------| delta[r]| = 
           |                  1      / d         \  |         |   
           |             -v - - b[r] |--- Psii(t)|  |         |   
           \                  2      \ dt        /  /         /   

  0
bc;
 / d  / d          \\             
 |--- |--- betaa(t)|| m v betaa(t)
 \ dt \ dt         //             

            /                           / d         \\         
            |           -v betaa + l[r] |--- Psii(t)||         
            |                           \ dt        /|         
    + c[rl] |delta[l] + -----------------------------| delta[l]
            |                  1      / d         \  |         
            |             -v + - b[r] |--- Psii(t)|  |         
            \                  2      \ dt        /  /         

            /                           / d         \\         
            |           -v betaa + l[r] |--- Psii(t)||         
            |                           \ dt        /|         
    + c[rr] |delta[r] + -----------------------------| delta[r]
            |                  1      / d         \  |         
            |             -v - - b[r] |--- Psii(t)|  |         
            \                  2      \ dt        /  /         

      / d         \    
    - |--- Psii(t)| = 0
      \ dt        /    
cd;
 / d          \    
 |--- betaa(t)| m v
 \ dt         /    

            /                           / d         \\
            |           -v betaa + l[r] |--- Psii(t)||
            |                           \ dt        /|
    + c[rl] |delta[l] + -----------------------------|
            |                  1      / d         \  |
            |             -v + - b[r] |--- Psii(t)|  |
            \                  2      \ dt        /  /

            /                           / d         \\
            |           -v betaa + l[r] |--- Psii(t)||
            |                           \ dt        /|
    + c[rr] |delta[r] + -----------------------------|
            |                  1      / d         \  |
            |             -v - - b[r] |--- Psii(t)|  |
            \                  2      \ dt        /  /

            /                / d         \\
      c[fl] |-v betaa - l[f] |--- Psii(t)||
            \                \ dt        //
    + -------------------------------------
                 1      / d         \      
            -v + - b[f] |--- Psii(t)|      
                 2      \ dt        /      

            /                / d         \\                    
      c[fr] |-v betaa - l[f] |--- Psii(t)||                    
            \                \ dt        //   / d         \    
    + ------------------------------------- - |--- Psii(t)| = 0
                1      / d         \          \ dt        /    
            v - - b[f] |--- Psii(t)|                           
                2      \ dt        /                           
 

 

 

 

I'm trying to solve the couple of ode

and 

with boundary conditions 

using differential transformation method.Isolved the equations and found the parameter values,further i coudn't plot the graph.

Can any one help me out to solve this

Hi !
I have several infinite sommations to evaluate. Maple 2018 on Windows 10 often gives me the solution in terms of hypergeometric functions. I know that the solution can be expressed in terms of sines and cosines.
I am not familiar with sumtools or Sumtools packages.
The convert (expr, StandardFunctions) or simplify (expr, hypergeom) commands do not work.
 
Here is an example of a sommation to evaluate.
 
My old version of Maple V release V (1997 version)  gives me the desired result with the same commands.
 

Is there a command that forces Maple to give me the solution in terms of sines and cosines ?
 
I don't have Mathematica. I hate Mathematica with its difficult syntax but I have access to a computer with Mathematica.
There is a "FunctionExpand" command which converts hypergeometrics into standard functions.
For the previous summation it works very well.
 
Thanks !
Réjean

Use Maple to calculate 245 to the power of 272 (ie 245^272).

Enter the last three digits of this number in the box below.

I have written a bit of code which solves a linear system for some quantities which have been Laplace and then Fourier transformed.  

e1 := -2*D*i*k*pi + A*s = 0

e2 := 2*A*i*k*pi + 2*C*i*k*pi + B*s = a

e3 := s*C + 4/5*P*w3*(2*pi*i*k*D - 2*1/3*pi*i*k*D)/w2 = -2*(C + 2*K*(2*pi*i*k*B - 2*1/3*pi*i*k*B))/(w2*K)

e4 := s*D + 2*5/4*P*t4*pi*i*k*C/(t2*K) = -5/(2*P)*D/(t2*K)

sys := {s*C + 4/5*P*w3*(2*pi*i*k*D - 2*1/3*pi*i*k*D)/w2 = -2*(C + 2*K*(2*pi*i*k*B - 2*1/3*pi*i*k*B))/(w2*K), s*D + 2*5/4*P*t4*pi*i*k*C/(t2*K) = -5/(2*P)*D/(t2*K), -2*D*i*k*pi + A*s = 0, 2*A*i*k*pi + 2*C*i*k*pi + B*s = a}

solve(sys, [A, B, C, D])

Linear_System.mw

I get at the end some fractions where everything in the fractions is a constant with some physical meaning except for k which is the only frequency as I am working in one dimension so just need one-dimensional Fourier and Laplace transforms.  s is the corresponding variable from the Laplace transform. 

I was wondering if Maple had some functionality which would enable me to inverse Laplace and then inverse Fourier transform these quantities A, B, C and D from the linear system such that I obtain an algebraic expression at the end and not a numerical result.

Hi all,

I have the attached code, it returns a "unable to parse" error after the line with the "FOC__1D1" assignment. I can't find out why.

 

Thank you for your help in advance,

JTamas

1_2_test.mw

I'm am pretty new to maple, coming from a mathcad background, so sorry in advance if this is a dumb question.  My original need was to plot text objects with sold backgrounds on top of other plotted objects.  I saw in other posts that Maple doesn't natively support this.  So instead I'm trying to create a composite plot of objects by plotting text objects over polygons or rectangles.  However I can't seem to make a given plotted object "cover" another plotted object.  

 

Below is a simple example.  The easy analogy is just that I want to plot these objects in “layer order”, with L1 being the top layer.  So I would like the polygon to opaquely obscure the “underlying” contour plot, and then in turn, the text object to behave as a “top-most layer” with the polygon acting as a background for the text. 

 

L1 := textplot([2, 2, "Polygon"], color = white);

L2 := polygon([[0, 0], [3, 4], [3, 1]], color = red);

L3 := contourplot(x^2 + y^2, x = 1 .. 2, y = 1 .. 2);

display(L3, L2, L1); 

Can anyone help get solution to a coupled pair of PDEs

Error, (in pdsolve/numeric/plot3d) unable to compute solution for t>HFloat(0.0):
Newton iteration is not converging..

I attach file: SemiclassicalTestfile.mw

Melvin

 

 


 

Dear maple user ,

I want to draw the area outside r=2+2*cos(theta) and inside r=3 ,where theta=0..2*pi.

 I am attacing the sample figure. 

thanks in advance

Why does "table" appear right under my equation? Like

Eq1 := .9*(diff(f(eta), eta, eta, eta))+.1*We*(diff(f(eta), eta, eta))*(diff(f(eta), eta, eta, eta))-(diff(f(eta), eta))^2+f(eta)*(diff(f(eta), eta, eta))^2+0.6e-1-.5*(diff(f(eta), eta))+.1*(table([w = 1.1]))(eta)*(1+beta1*(table([w = 1.1]))(eta))+.1*phi(eta)*N*(1+.1[c]*phi(eta)) = 0

Hi, 

I am trying to solve a system of 3 ODE of order 4. 

Is there any template to do it? 

When I try it, I get a message:

Error, (in dsolve/numeric/bvp/convertsys) too few boundary conditions: expected 10, got 8
What is wrong with it?

> restart;
> with*plots; blt := 5;
> lambda := .1; delta := .1;
                                     0.1
                                     0.1
> gamma2 := .1;
                                     0.1
> lambda2 := .1; lambda[T] := .7; lambda[C] = .1;
> Pr := 2;
> Nb := 0.1e-1;
> Nt := 0.1e-1;
> Sc := 0.1e-1;
> M := .5; E = -.1;
> N := 0.1e-1; n = .1;
> sigma[1] := .1;
> alpha[0] := 0; omega := 0;
                                      0
                                      0
> Eq1 := diff(f(eta), eta, eta, eta)+gamma2*((diff(f(eta), eta, eta))*(diff(f(eta), eta, eta))-f(eta)*(diff(f(eta), eta, eta, eta, eta)))-(1+lambda2)*((diff(f(eta), eta))*(diff(f(eta), eta))-f(eta)*(diff(f(eta), eta, eta)))-(1+lambda2)*M*sin(omega)^2*(diff(f(eta), eta))+(1+lambda2)(lambda*(1+lambda[T]*theta(eta))*theta(eta)+lambda*N*(1+lambda[C]*phi(eta))*phi(eta))*cos(alpha[0]) = 0;
                                                           2
/  d   /  d   /  d         \\\       /  d   /  d         \\ 
|----- |----- |----- f(eta)||| + 0.1 |----- |----- f(eta)|| 
\ deta \ deta \ deta       ///       \ deta \ deta       // 

                                                                           2
                /  d   /  d   /  d   /  d         \\\\       /  d         \ 
   - 0.1 f(eta) |----- |----- |----- |----- f(eta)|||| - 1.1 |----- f(eta)| 
                \ deta \ deta \ deta \ deta       ////       \ deta       / 

                /  d   /  d         \\          
   + 1.1 f(eta) |----- |----- f(eta)|| + 1.1 = 0
                \ deta \ deta       //          
> Eq2 := diff(theta(eta), eta, eta)+Pr*f(eta)*(diff(theta(eta), eta))+Pr*Nb*(diff(theta(eta), eta))*(diff(phi(eta), eta))+Pr*Nt*((diff(theta(eta), eta))*(diff(theta(eta), eta))) = 0;
/  d   /  d             \\            /  d             \
|----- |----- theta(eta)|| + 2 f(eta) |----- theta(eta)|
\ deta \ deta           //            \ deta           /

                                                                       2    
          /  d             \ /  d           \        /  d             \     
   + 0.02 |----- theta(eta)| |----- phi(eta)| + 0.02 |----- theta(eta)|  = 0
          \ deta           / \ deta         /        \ deta           /     
> Eq3 := diff(phi(eta), eta, eta)+Sc*f(eta)*(diff(phi(eta), eta))+Nt*(diff(theta(eta), eta, eta))/Nb-Sc*sigma[1]*(1+delta*theta(eta))^n*exp(-E/(1+delta*theta(eta))) = 0;
       /  d   /  d           \\               /  d           \
       |----- |----- phi(eta)|| + 0.01 f(eta) |----- phi(eta)|
       \ deta \ deta         //               \ deta         /

                        /  d   /  d             \\
          + 1.000000000 |----- |----- theta(eta)||
                        \ deta \ deta           //

                                      n    /          E         \    
          - 0.001 (1 + 0.1 theta(eta))  exp|- ------------------| = 0
                                           \  1 + 0.1 theta(eta)/    
> bcs1 := f(0) = 0, (D(f))(0) = 1, (D(f))(blt) = 0, (D(D(f)))(blt) = 0, theta(0) = 1, theta(blt) = 0, Nb*(D(phi))(0)+Nt*(D(theta))(0) = 0, phi(blt) = 0;
   f(0) = 0, D(f)(0) = 1, D(f)(5) = 0, @@(D, 2)(f)(5) = 0, theta(0) = 1, 

     theta(5) = 0, 0.01 D(phi)(0) + 0.01 D(theta)(0) = 0, phi(5) = 0
> NULL;
> L := [.1, .5, 1.0, 5.0, 10.0];
                         [0.1, 0.5, 1.0, 5.0, 10.0]

> for k to 5 do R := dsolve(eval({Eq1, Eq2, Eq3, bcs1}, M = L[k]), [f(eta), theta(eta), phi(eta)], numeric, method = bvp[midrich], maxmesh = 4096, abserr = 0.1e-1, output = listprocedure); X1 || k := rhs(R[3]); X2 || k := rhs(R[4]); X3 || k := rhs(R[5]); Y1 || k := rhs(R[6]); Y2 || k := -rhs(R[7]); Z1 || k := rhs(R[8]); Z2 || k := -rhs(R[9]) end do;
Error, (in dsolve/numeric/bvp/convertsys) too few boundary conditions: expected 10, got 8
> R;
                                      R

> print([(X1 || (1 .. 5))(0)]);
                  [X11(0), X12(0), X13(0), X14(0), X15(0)]
> print([(X2 || (1 .. 5))(0)]);
                  [X21(0), X22(0), X23(0), X24(0), X25(0)]

> print([(Y1 || (1 .. 5))(0)]);
                  [Y11(0), Y12(0), Y13(0), Y14(0), Y15(0)]
> print([(Y2 || (1 .. 5))(0)]);
                  [Y21(0), Y22(0), Y23(0), Y24(0), Y25(0)]
> print([(Z1 || (1 .. 5))(0)]);
                  [Z11(0), Z12(0), Z13(0), Z14(0), Z15(0)]
> print([(Z2 || (1 .. 5))(0)]);
                  [Z21(0), Z22(0), Z23(0), Z24(0), Z25(0)]
> NULL;
> NULL;
> plot([X1 || (1 .. 5)], 0 .. blt, labels = [eta, (D(f))(eta)], thickness = 1, color = black);
Warning, unable to evaluate the functions to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct


> plot([Y1 || (1 .. 5)], 0 .. blt, labels = [eta, theta(eta)], thickness = 1, color = black);
Warning, unable to evaluate the functions to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct


> plot([Z1 || (1 .. 5)], 0 .. blt, labels = [eta, phi(eta)], thickness = 1, color = black);
Warning, unable to evaluate the functions to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct


 

First 588 589 590 591 592 593 594 Last Page 590 of 2428