MaplePrimes Questions

Hello,

I'm trying to solve the following ode system:

odes := diff(a0(t), t) - diff(a1(t), t) + diff(a2(t), t) = 0, diff(a0(t), t) - diff(a2(t), t) - 16*a2(t) = 0, diff(b0(t), t) + diff(b1(t), t) + diff(b2(t), t) = 0, diff(b0(t), t) - diff(b2(t), t) - 48*b2(t) = 0, diff(a1(t), t) + 4*diff(a2(t), t) - 3*diff(b1(t), t) + 12*diff(b2(t), t) = 0, diff(a0(t), t) + diff(a1(t), t) + diff(a2(t), t) - diff(b0(t), t) + diff(b1(t), t) - diff(b2(t), t) = 0;
   
ics := a0(0) - a2(0) = 0, b0(0) - b2(0) = 1, a0(0) - a1(0) + a2(0) = 0, b0(0) + b1(0) + b2(0) = 1, a1(0) + 4*a2(0) - 3*b1(0) + 12*b2(0) = 0, a0(0) + a1(0) + a2(0) - b0(0) + b1(0) - b2(0) = 0;


dsdef := dsolve({ics, odes}, numeric);

 

There are 6 ordinary differential equations with 6 initial conditions. The functions are named a0(t), a1(t), a2(t), b0(t), b1(t), b2(t).

The question is that Maple solve the system analliticaly (exact dsolve) but when I run the "numerical dsolve" it returns: "Error, (in DEtools/convertsys) invalid specification of initial conditions", and I can't recognize the error/s.

Thanks.

How to show that the function z0(t)=t²+exp(-t)  is solution of z"(t)+2z'(t)+z(t)=2exp(-t); Thank you.

I tried to draw a normal boxplot for the a simple data using Maple. My attempt is in below.

X := [13, 15, 16, 16, 19, 20, 21, 21, 22, 22, 25, 25, 25, 25, 30, 33, 33, 35, 35, 35, 35, 36, 40, 45, 46, 52, 70]:
P1 := Statistics[BoxPlot](X, offset = 1, distance = 1, width = 1, orientation = horizontal, outliers = true);
plots[display](P1, view = [1 .. 80, 0.5 .. 2.5]);

But I am not happy from the result.

  1. It seems the box-plot range doesn't include the max, 70, instead it puts a circle there!

      2. What are the small rectangles and circles? I just need a simple box-plot with the line-range starting from min and ending at max, then a box starting from the first quartile and ending at the third quartile and a vertical line at the median. No extra feature and not ignoring any data.

      3. I don't want the vertical axis which is for the index of the data, I just have one data and that vertical axis is just distracting the audience.

How to resolve these three issues?

all in real domain, sqrt(A)*sqrt(B) can be combined to sqrt(A*B) when both A,B are non-negative.

Is there a way in Maple to  find the conditions when sqrt(A)*sqrt(B)=sqrt(A*B) ? i.e. the conditions on A,B where this is true?

A,B will only be functions of x,y.   

An example will make things clear.

restart;
expr1:=sqrt(x^2*y - 4)*sqrt(x^2*y);
expr2:=sqrt(  (x^2*y - 4)*(x^2*y));

By looking at the above, we see that expr1 = expr2 when  x^2*y-4>=0 and x>0 or x^2*y-4>=0 and x<0. Actually I think only x^2*y-4>=0 is needed, since x is being squared anyway.

How to make Maple show this? I can't get Maple to show this

solve(expr1=expr2,[x,y]) assuming real;

But this is wrong. it says it is true for all x and all y?.   Mathematica can do it using Reduce command

I know I can force the combination by using the command

combine(expr1,sqrt,symbolic);

ps. Maple took the x outside the sqrt. So x>0 is assumed here.

pps. I do not understand why simplify(expr1,symbolic) did not work here, and neither  simplify(expr1,symbolic,size=false) worked. Only combine worked.

But I wanted to see if Maple could tell the condition when this is allowed, so I can write these down.

It would be nice if the command above would also tell the conditions under which it combined the sqrts. But this information is not given.

This is all done non-interactive in a program without being able to look at the screen and decide what to do. Only thing I know is that if an expression has sqrts and functions of x,y.

Is there a way in Maple to have tell conditions when expr1=expr2?

Maple 2020.2

 I installed maple calculator on iphone. I have problem with function x=y^2.

the arms of the chart should point to the right, not up

Other calculators like Graph Calculator showing in proper way generated chart/plot. But on maple I have problem - what I’m doing wrong.. I spent a lot of time to find answer but without success. 

 

Hi, 
The result below surprises me.
Why does  rgf_findrecur return a result instead of saying that there is no homogeneous linear recurrence of order 1?

interface(version)

Standard Worksheet Interface, Maple 2015.2, Mac OS X, December 21 2015 Build ID 1097895


genfunc:-rgf_findrecur(1, [1, 2, 3, 4], t, n);
                       t(n) = 2 t(n - 1)

PS: maybe this was a problem in Maple 2015, if it has been corrected since just let me know

By using equation x^2+y^2=4 for cylinder and plane z=0 and the plane z=3-x, plot the solid.

I would like to split the expression 1 / (x²+i)² into partial fractions, but Maple (2020) doesn't seem to know:
convert(1/(z^2+I)^2, parfrac, z);

How do i fix this?

I wanna shade/fill different areas in a single graph and provide a legend for the graph. Areas are defined as follows where 0<=x<=1 and 0<=z<=1. 

(label = c1) \quad if 0<x<1/13*(5-2sqrt(3)),0<z<1/2(2x+x^2)+1/2sqrt(4x^3+x^4)

 

(label = c2) \quad if 0<x<1/13*(5-2sqrt(3)),1/2(2x+x^2)+1/2sqrt(4x^3+x^4)<z<2x

 

I am trying solve on the outout of odetest, in order to determine range of which x makes this output zero.

It works sometimes and  does not work another times. I mean, it gives correct domain something, and other times, it overlooks some domain. 

Here is an example

restart;
ode:=x*diff(y(x),x)*y(x) = (y(x)^2-9)^(1/2):
ic:=y(exp(4)) = 5:
sol:=dsolve([ode,ic],y(x)):
res:=odetest(sol,ode);
solve(simplify(res),x,allsolutions = true) assuming real;

It is true than when x=1, then is zero.  But so all values x>1 as well.

How to get solve to find those values as well and not just x=1?

I tried PDEtools:-Solve as well. It did not better

PDEtools:-Solve(simplify(res),x,allsolutions = true) assuming real;

Compare to Mathematica

Are there other commands in Maple which could obtain all the solutions like in the above?

Maple 2020.2 on windows 10

 

 

My problem is a hickup in the Maple 2020 version as compared to earlier versions :

In the Maple 2020 listtorec from package gfun asks for unknown value u(0) in recognition of series.

Example from the Maple help page:

with(gfun);
l := [1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 58786];
rec := listtorec(l, u(n));
Error, (in gfun:-listtorec) invalid unknown function, u(0)

This error also happens with the second example in the Maple help page:

rec2 := seriestorec(series(add(l[i]*x^(i - 1)*(i - 1)!, i = 1 .. nops(l)), x, 12), u(n), ['egf']);
Error, (in gfun:-seriestorec) invalid unknown function, u(0)

How to feed this unknown value in the  call?
 


 

I have the following piece of code:

beta := 16250.25391;

tlow := 11.92817468;

y0 := t -> 1/4*4^(7/8)/(beta*(tlow - t))^(1/8);

r0 := 1;

r2 := 1.194444444;

r3 := -2.071877530;

dyr := t -> M*(-2*r0*diff(y0(t), t)/y0(t)^3 + 2*r2*y0(t)*diff(y0(t), t) + 4*r3*y0(t)^3*diff(y0(t), t));

plot(dyr(t))

Everything seems to work out fine until this point and I obtain a good plot. The problem occurs when I try calling the value of dyr at a specific point t. Here is an example:

dyr(5)
Error, (in dyr) invalid input: diff received 5, which is not valid for its 2nd argument

I understand there is something wrong with the diff part. I tried writing the following simple code and I have the same problem.

y := t -> t^2

z := t -> diff(y(t), t)

z(1);
Error, (in z) invalid input: diff received 1, which is not valid for its 2nd argument

I start with a function that has only one argument and it seems like introducing the diff requires that I use two arguments. y0 is a function of t solely and I would like dyr to have the same argument, so that I can call dyr(t) at any point t I want. Please take a look at this. Thanks in advance.

I can't figure exactly why adding export on module wide variable when using option package makes the variable not writable from a function inside the module

restart;

dsolver :=module()
option package;
export X::boolean := true;

export foo:=proc()
   dsolver:-X :=false;
end proc;
end module;

dsolver:-foo();

Error, (in foo) attempting to assign to `X` which is protected.  Try declaring `local X`; see ?protect for details.

But this works

dsolver :=module()
export X::boolean := true;

export foo:=proc()
   dsolver:X :=false;
end proc;
end module;

dsolver:-foo();

    false;

I wanted to make the variable export, so it can be set from anywhere (by other modules for example, directly). if I make it local, then other modules can no longer access it?

I know I can change the export to local as the error says. But why is this needed? Only thing I found so far, is this

"Not all modules are packages. Package semantics differ from module semantics in two ways. First, (module-based) package exports are automatically protected. Second, packages can be used as the first argument to"

So the above says function inside module, can't change module wide variable, if this variable is exprted, when using option package? Why?

In general, I am still not sure when to use option package or not. 

Are there any general rules as to when one needs to add option package vs. Not using this option? i.e. just use module() without this option? or the question is: When must one use option package?

I put everything (all modules) eventually in an .mla file and both cases work the same in this respect, so not sure when to use this option now. 

Maple 2020.2 on windows 10

Hello everyone;

There is itterative scheme and i have written a code. I want to know time and bytes used in each itteration. I have used the command "Usage" and code is showning results which are not right i thin becasue momery used should increase with itterations i.e., computaion is increasing so. CPU time is alos a issue here in my code.

Note: Code is also uploaded.

Thanks in advance. 

The code 

S:=sum(1/x__i,i=1..5)

will give us the following ouput

Why not 

S:=add(1/x__i,i=1..5)

 also give same result. why?How to do?

I also note that:

S:=add(1/x||i,i=1..5)

S:=sum(1/x||i,i=1..5)

 

First 337 338 339 340 341 342 343 Last Page 339 of 2308