MaplePrimes Questions

I do not understand why  simplify(eq,size,assume =t::real); gives an error but simplify(eq,size) assuming t::real; does not.

Which is the correct way to use assumptions with simplify? Inside or outside? And why would it make a difference?

Maple 2020.2 on windows 10.

interface(version);

`Standard Worksheet Interface, Maple 2021.2, Windows 10, November 23 2021 Build ID 1576349`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1122 and is the same as the version installed in this computer, created 2021, December 22, 16:3 hours Pacific Time.`

restart

eq:=t = 1/2*Int(1/ln(exp(t^2-2*t*y+y^2))^(1/2)/exp(t^2-2*t*y+y^2)/(exp(t^2-2*t*y+y^2)-1),exp(t^2-2*t*y+y^2))+c[1];
simplify(eq,size,assume =t::real);
 

t = (1/2)*(Int(1/(ln(exp(t^2-2*t*y+y^2))^(1/2)*exp(t^2-2*t*y+y^2)*(exp(t^2-2*t*y+y^2)-1)), exp(t^2-2*t*y+y^2)))+c[1]

Error, (in assuming) when calling '`anonymous procedure called from tools/recurse/indets`'. Received: 'invalid input: `simplify/int/simplify` expects its 3rd argument, r, to be of type {name, list({range, name = range}), name = anything}, but received exp((t-y)^2)'

simplify(eq,size) assuming t::real;

t = (1/2)*(Int(1/(ln(exp((y-t)^2))^(1/2)*exp((y-t)^2)*(exp((y-t)^2)-1)), exp((y-t)^2)))+c[1]

 

I know the above inert int looks strange, but this is why it is inert. Later on there will be change of variable to make the integration variable a single symbol again as in normal integration usage.

Download simplify_error.mw

Hi, I'm just trying to use assign, like in Maple,

 

s := solve({x + y = 1, 2*x + y = 3}, {x, y});

 

                      s := {x = 2, y = -1}

assign(s);
x, y;
                             2, -1

in MapleFlow, but it doesn't work!

Any ideas?

Thanks very much in advance

Equação26_12.mw

Download Equação26_12.mw

Hello!

How can i get datas and graphs of implicit function. I tried...

with(DEtools, odeadvisor);

ode := diff(y(x), x) = (-0.1*(y(x) - 0.7)^3 - 0.8*y(x)*(y(x) - 0.7)^2)/(0.7^2 - 2*0.7*y(x) + y(x)^2 - 0.7*0.2*0.8);
                                    3                        2
         d         -0.1 (y(x) - 0.7)  - 0.8 y(x) (y(x) - 0.7) 
 ode := --- y(x) = -------------------------------------------
         dx                                        2          
                            0.378 - 1.4 y(x) + y(x)           
odeadvisor(ode);
          /                            3                        2\
          | d         -0.1 (y(x) - 0.7)  - 0.8 y(x) (y(x) - 0.7) |
odeadvisor|--- y(x) = -------------------------------------------|
          | dx                                        2          |
          \                    0.378 - 1.4 y(x) + y(x)           /
ans := dsolve(ode, implicit);
                2        9                    199                
ans := x + ----------- + -- ln(10 y(x) - 7) + --- ln(90 y(x) - 7)
           10 y(x) - 7   28                   252                

   + _C1 = 0
ic1 := y(0) = 0;
                        ic1 := y(0) = 0
sol := dsolve([ode, ic1], implicit);
                2        9                    199                
sol := x + ----------- + -- ln(10 y(x) - 7) + --- ln(90 y(x) - 7)
           10 y(x) - 7   28                   252                

     2   10         10         
   + - - -- ln(7) - -- I Pi = 0
     7   9          9          
subs(x = 1, sol);
   9        2        9                    199                
   - + ----------- + -- ln(10 y(1) - 7) + --- ln(90 y(1) - 7)
   7   10 y(1) - 7   28                   252                

        10         10         
      - -- ln(7) - -- I Pi = 0
        9          9          
solve(9/7 + 2/(10*y(1) - 7) + (9*ln(10*y(1) - 7))/28 + (199*ln(90*y(1) - 7))/252 - (10*ln(7))/9 - 10*I*Pi/9 = 0, y(1));
1     /      /                                                  
-- exp|RootOf|-280 I Pi exp(_Z) - 280 ln(7) exp(_Z) + 15680 I Pi
90    \      \                                                  

          /1           56\                                       
   + 81 ln|- exp(_Z) - --| exp(_Z) + 199 _Z exp(_Z) + 15680 ln(7)
          \9           9 /                                       

                          /1           56\                   \\
   + 324 exp(_Z) - 4536 ln|- exp(_Z) - --| - 11144 _Z - 13608||
                          \9           9 /                   //

     7 
   + --
     90
implicitplot(sol, x = 0 .. 10, y = 0 .. 10);
                /         2        9                 
    implicitplot|x + ----------- + -- ln(10 y(x) - 7)
                \    10 y(x) - 7   28                

         199                   2   10         10           
       + --- ln(90 y(x) - 7) + - - -- ln(7) - -- I Pi = 0, 
         252                   7   9          9            

                              \
      x = 0 .. 10, y = 0 .. 10|
                              /
but I wasn't successful.

Thanks

Thank you everyone!

I am trying to solve an ODE with nonlinear boundary conditions, it is a BVP. And the maple let me to specify an approximate initial solution. I just don't know how to define the initial solution. What format is the initial solution? I have tried the Help Document told me to, but I still can't figure it out. Please help me, thank you!

In

I want to compute x__0 as a function of alpha. I tried fsolve but could not make it work (see attached).

What did I do wrong? Are there other ways in Maple to solve such problems?

I am stuck here and would very much appreciate help.

inverse_function_with_fsolve.mw

Update:

Its likely that the recently introduced warnings for definite integrals would have helped in this case to find a solution on my own. When I run this worksheet with Maple 2023, it immediately suggests the use of assumptions.

Hi everyone. 

I need a program in maple to simulate the orbit of a satellite slowed down by the earth's atmosphere.

I chose the simple case, in which the orbits of the two are elliptical and I use The animation to do this. In this case I did not consider that the satellite interacts with the atmosphere.

Now,  I need equations to write part of the program in which I think the satellite is slowed down by the earth's atmosphere. I don't have any ideea to resolve this problem.

Soo.. I really need your' help as soon as posible.

Thank you a lot! 

Dear Users!

Hope you are doing well. I have a funtion give bellow:
beta[1]*exp(x*alpha[1]+y*beta[1]-z*sqrt(-alpha[1]^2-beta[1]^2))/(1+exp(x*alpha[1]+y*beta[1]-z*sqrt(-alpha[1]^2-beta[1]^2)));
For any value of alpha[1] and beta[1] the term highlighted red becomes the imaginary form. I want to separate the real and imaginary parts of this function. Kindly help me in this matter, thanks

Hi, I am trying to enter into the Mini-Course Computer Algebra for Physicists from the help, but instead of going to the page I get the help page of Physics[FeynmanIntegral]. Can anyone confirm that this happens to them on Maple 2021.2?

Kevin

How do I make a new dataframe based on the criteria that a particular row is included when a particular element in that row is equal to a specific string, say, "Ontario"?

I downloaded the publicly availble covid dataset from the Gov. of Canada website.  I want to look at data pertaining to Ontario only. Each data entry corresponds to a row of data where the second column represents the province or territory.  My goal is to create a new dataframe of rows where the second column entry is equal to the string "Ontario".

I have attached my maplesheet.  I can't upload the data but it can be downloaded here: https://open.canada.ca/data/en/dataset/261c32ab-4cfd-4f81-9dea-7b64065690dc.

In the image below, see how the second column is a mix of different strings.  I want a new dataframe where the second column reads only "Ontario".  I have included my naive attempt to select data with 'prname'="Ontario".

sort_data_and_make_new_df_Covid_Analysis_Sheet_1.mw

Hi, I have problem at this coding. Can you help me?

restart;
eq1 := diff(u(u, t), t) = A[0] + A[1]*cos*omega*t + Beta[1]*[diff(u(u, r), r $ 2) + diff(u(u, r), r)/r];
                  d                                   
          eq1 := --- u(u, t) = A[0] + A[1] cos omega t
                  dt                                  

                       [                  d         ]
                       [/  2         \   --- u(u, r)]
                       [| d          |    dr        ]
             + Beta[1] [|---- u(u, r)| + -----------]
                       [|   2        |        r     ]
                       [\ dr         /              ]


The*number*of*node*points;
N := 4;
                             N := 4

The*length*of*domain;
L := 1;
                             L := 1

BC1 := u(1, t) = 0;
                       BC1 := u(1, t) = 0

IC1 := u(r, 0) = 0;
                       IC1 := u(r, 0) = 0

dudt := (u[m + 1] - u[m])/(delta*t);
                            u[m + 1] - u[m]
                    dudt := ---------------
                                delta t    

dudr := (u[m + 1, j] - u[m - 1, j])/(2*delta*r);
                       u[m + 1, j] - u[m - 1, j]
               dudr := -------------------------
                               2 delta r        

d2udr2 := (u[m + 1, j] - 2*u[m] + u[m - 1, j])/(delta*r^2);
                    u[m + 1, j] - 2 u[m] + u[m - 1, j]
          d2udr2 := ----------------------------------
                                        2             
                                 delta r              

Three point forward and backward difference expressions for the derivative are:
Error, unable to parse
Typesetting:-mambiguous(Typesetting:-mambiguous(

  Three point forward and backward difference expressions for, 

  Typesetting:-merror("unable to parse")) the derivative arecolon)


dudrf := (-u[2] + 4*u[1] - 3*u[0])/(2*delta*r);
                         -u[2] + 4 u[1] - 3 u[0]
                dudrf := -----------------------
                                2 delta r       

dudrb := (u[N - 1] - 4*u[N] + 3*u[N + 1])/(2*delta*r);
                         u[3] - 4 u[4] + 3 u[5]
                dudrb := ----------------------
                               2 delta r       

The*governing*equation in finite*difference*form*is;
Eq[m] := subs(diff(u(u, t), t) = dudt, diff(u(u, r), r) = dudr, diff*(u(u, r), r $ 2) = d2udr2, eq1);
         u[m + 1] - u[m]                                     [
Eq[m] := --------------- = A[0] + A[1] cos omega t + Beta[1] [
             delta t                                         [
                                                             [

  / d  /u[m + 1, j] - u[m - 1, j]\\   u[m + 1, j] - u[m - 1, j]]
  |--- |-------------------------|| + -------------------------]
  \ dr \        2 delta r        //             2              ]
                                             2 r  delta        ]


The*boundary*condition in finite*difference*form*are;
Eq[0] := subs(diff(u(r), r) = dudrf, u(r) = u[0], BC1);
                      Eq[0] := u(1, t) = 0

The*initial*condition in finite*difference*form*are;
Eq[N + 1] := subs(diff(u(r), r) = dudrb, u(r) = u[0], IC1);
                      Eq[5] := u(r, 0) = 0

for i to N do
    Eq[m] := subs(m = i, Eq[m]);
end do;
           u[2] - u[1]                                        
  Eq[m] := ----------- = A[0] + A[1] cos omega t + Beta[1] [0]
             delta t                                          

           u[2] - u[1]                                        
  Eq[m] := ----------- = A[0] + A[1] cos omega t + Beta[1] [0]
             delta t                                          

           u[2] - u[1]                                        
  Eq[m] := ----------- = A[0] + A[1] cos omega t + Beta[1] [0]
             delta t                                          

           u[2] - u[1]                                        
  Eq[m] := ----------- = A[0] + A[1] cos omega t + Beta[1] [0]
             delta t                                          

The node spacing is given by:
Error, unable to parse
        Typesetting:-mambiguous(Typesetting:-mambiguous(

          The node spacing is given by, 

          Typesetting:-merror("unable to parse"))colon)


h := L/(N + 1);
                                  1
                             h := -
                                  5

eqs := seq(evalm(subs(Beta = 0.25, Eq[i])), i = 0 .. N + 1);
  eqs := u(r, 0) = 0, Eq[1], Eq[2], Eq[3], Eq[4], u(r, 0) = 0

vars := seq(u[i], i = 0 .. N + 1);
           vars := u[0], u[1], u[2], u[3], u[4], u[5]

soll := fsolve({eqs}, {vars});
Error, (in fsolve) {r, Eq[1], Eq[2], Eq[3], Eq[4]} are in the equation, and are not solved for

Correction

Please ignore this question. dsolve does hang, but I had typo in the timelimit command itself when I wrote the test. Fixing this, now it timesout OK.

Maybe someone can look why dsolve hangs on this ode. But since timelimit does work, there is a workaround.

Original question

I was checking Maple's dsolve on this textbook problem

The book gives the answer in the back as

When using Maple's dsolve, I found it hangs. The stange thing, is that adding timelimit() also hangs. I can understand dsolve() hanging sometimes. But what I do not understand is why with timelimit it also hangs?

I've waited 20 minutes and then gave up. As you see, the timelimit is 20 seconds. May be if I wait 2 hrs or 20 hrs or 20 days, it will finally timeout. I do not know but can't wait that long.

Do others see same problem on this ode? Does it hang for you? How about on the mac or Linux?

During this time, I see mserver.exe running at very high CPU. I restarted Maple few times, but this did not help.

Maple 2021.2 on windows 10. May be one day Maplesoft will fix timelimit so it works as expected. 

interface(version)

`Standard Worksheet Interface, Maple 2021.2, Windows 10, November 23 2021 Build ID 1576349`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1122 and is the same as the version installed in this computer, created 2021, December 22, 16:3 hours Pacific Time.`

restart;

ode:=x*diff(y(x),x)=y(x)*cos(ln(y(x)/x));
try
   timeout(20,dsolve(ode));
catch:   
   print("timedout");       
end try;   
print("OK");

x*(diff(y(x), x)) = y(x)*cos(ln(y(x)/x))

 

Download test_ode_hang.mw

 

I have a series of 5681 points that lie on the unit sphere.  These were generated by a simulation in another software package (I plat to use Maple for this in the future).  But anyway, I'm stuck on plotting right now.    The pointplot3d  command plots them all at once.   I want to slow this down and see them plotted sequentially in time, adding a new point at each time increment.    It would be like watching a zipper or a string of yarn being wound onto a ball.   It doesn't seem like the usual animation controls allow me to do this.  Hope that description makes sense.

Ball_of_yarn.mw

Ball_of_yarn.mw

Ball_of_yarn.mw

Hi! this is another question about chaos dynamic in Maple last question was about invariant denisty measure on which user Carl Love helped me to answer. Below is link to this question:

https://www.mapleprimes.com/questions/233277-How-To-Optimize-Code-For-Counting-Experimental

So now I want to sketch Lyapunov exponent:

restart;
with(plots);
M := 100;
r := evalf([seq(a/M, a = 3*M .. 4*M)]);
x := t -> t;
x0 := 0.2;
iter := 8;

f := x -> r[i]*x*(1 - x)

g := (n, x) -> (f@@n)(x)

L := seq(D(g(iter, x))(x0), i = 1 .. M)

lambda := seq(ln(abs(L[i]))/iter, i = 1 .. M)

pointplot([seq([3 + a/M, lambda[a]], a = 1 .. M)])

here for comparison a better assignment

main problem is to take proper M and iter because iter above 8 takes too much time to calculate and M additonaly extends the time of calculations. M here is about dividing domain of our function lambda and higher M means more accurate value. Iter is from definition of Lyapunov exponent lambda(x0)=lim  1/{iter}( ln(|diff(f^{iter}(x0),x)| ),iter goes to infinity). Iter is for the more irregular shape of the curve.

Thanks in advance and Merry Christmas.

 

Some more difficult calculation with complex numbers

Starting from the equation     
A = arctan(z/b)/b and arctan(z/b)/b = int(1/(b^2+z^2), z = 0 .. z)
made the substitution                               
z = i*b(t-1)/(t+1)
Thus obtaining NULL
A = -(int(1/t, t = 1 .. t))/(2*bi) and -(int(1/t, t = 1 .. t))/(2*bi) = log[10](t)/(2*bi) and log[10](t)/(2*bi) = log[10]((b*i+z)/(b*i-z))/(2*bi)
One of the important relations between logarithms and inverse trigonometrische functions

Download logaritmisc_functie_betrekking_goniometrische_functie.mw

Sorry to bother moderators again but a question from @panke has just disappeared.
I browsed its old questions but found none in a recent past related to the one removed.
Can you please tell me where it has been moved ?

TIA

PS: I understand perfectly the need to avoid multiple occurrences of a same thread, but in case of the displacement of a question, couldn't a systematic message be sent?

First 352 353 354 355 356 357 358 Last Page 354 of 2427