MaplePrimes Questions

Search Questions:

Latest Questions Latest Questions Feed

Dear all,

I would like to solve the following non linear ODE with Maple, but I am no able. I do not know if it is possible, beccause it is nolinear.

I really appreciate any advice or help. This is the equation:

y'(x) - (Q - x*p0*(exp(alpha-beta*y(x)))/(1+exp(alpha-beta*y(x))))^2=0

thanks a lot

Hey everyone,

I'm using printf to print out the following:

printf("Absolute error = %.10f \nRelative error = %.10f", abs(fractionPart-binarySum), 100*abs(fractionPart-binarySum)/fractionPart)

however, it's tedious always having to edit the two occurrences of "10" decimal places. Is there a way to define a variable like decimals := 10 and then refer to it inside the quotation marks in printf?

Hello everyone,

 

Is it normal that commands #1 and #2 below do not return the same thing ?

 

L := [`Norman.Mailer`, `Richard.Brautigan`]

#1

map(u -> convert(u, string), L);

["Norman.Mailer", "Richard.Brautigan"]


#2

`convert/string`~(L)

["`Norman.Mailer`", "`Richard.Brautigan`"]


Side question : I am not really familiar with the tilde operator and I often use map instead.
Does it exist a better practice in these matters ?

Thanks in advance

Hello everybody!

Please help me to solve the attached partial differential equation. I am getting an error. I do have its analytical solution and that works fine.

The error is as follows
Error, (in pdsolve/numeric/plot) unable to compute solution for t>HFloat(0.0):
solution becomes undefined, problem may be ill posed or method may be ill suited to solution

The worksheet is attached hereshortsngle.mw

In feature "Procedures for two animations" posted by Kitonium appears this line, within a procedure.

T1:=(O2*~y+O1*~u)/~(y+u): T2:=(O3*~u+O2*~v)/~(u+v): T3:=(O4*~v+O3*~z)/~(v+z):

What is the meaning of "~y", for instance, and how does it differ from "y"?

I understand the conventional usage of ~ with a name in output to imply that that name is subject to an assumption.

I have been able to find nothing pertinent in the Maple Help information.  Please enlighten me.

Hi everybody.

I often regret that Maple 18 and further versions (maybe some others before ?) do not represent lengthy and complex outputs by introducing substitution expressions (i.e. %1, %2, ...) as Maple 5 or 8 did.

An exemple can be found in the Maple V release 5 programming Guide (p95, expression %1 = ...)

To be more precise I provide you the output Maple 2015 gives on the same problem treated in "Introduction to Maple, André Heck (1993) Springer Verlag" ; page 86 (no advertising here !).

The problem is about solving a polynomial system in 3 indeterminates.
One of the (set of) solutions is quite complex and looks like (I represent just the beginning of the complete solution) :

{x = %1, y = -1/8*(%1^6 + 15*%1^4 ...) / %1^4 , z = ...}
%1 := RootOf(....)  

From at least Maple 18 this same solution takes this form

{x =  RootOf(....), y = -1/8*( RootOf(....)^6 + 15* RootOf(....)^4 ...) / %1^4 , z = ...}

My question is very simple : Does it exist a way to tell Maple to act as Maple 5/8 did ?

Thanks in advance.


PS1 : I tried things like subs(RootOf(....)=freeze(RootOf(....)), sols) but it is not perfect because I dit this manually, by a copy of RootOf(....) from the output and a paste into the subs(....) input (shame on me !)


PS2 : I use to work in worksheet mode, not document mode, and I would prefer an answer adapted to the worksheet mode.

 

Download Maple2015.mw

Hi All,

When doing retart in a saved workbook get a no read access error link (see partial screen shot below). When the link is followed the message is there is no help for this error.

I am using Windows 10 64 bit and have full administrative prilvilages so I not sure what the problem is.

I have the same issue when I upload to the cloud.

In spite of message I can still do computations.

Any help in understanding this will be greatly appreciated.

Thanks,

 

Joe

 

g:= a -> int(f(x+a),x=a..2*a):
eval(g(x),x=1);
                    int(f(2 x), x = 1 .. 2)
eval(g(z),z=1);
                   int(f(x + 1), x = 1 .. 2)

eval is advertised as smart, but it's not enough!


(Related to a recent answer of Carl Love about bound variables.)

 

Edit: shorter version

g:= a -> int(sin(sin(x+a)),x=a..2*a):
evalf(eval(g(x),x=1))=evalf(eval(g(z),z=1));
                  0.1052070507 = 0.5294405453

After several attempts on this question,

Int(x*sqrt(2*x^4+3),x) with substitution u = sqrt(2)*x^2,

I don't seem to find the solution. Can you guys help me?

Frequently a variable appears in an expression but not in the result, e.g., there is no x in int(sin(x),x=0..3). How do I tell that to Maple? I am trying to solve (numerically) an ODE of the form
x^2 y'' + alpha(x) y' +   beta(y) = 0. However, alpha(x) has an integral in its defintion whose upper limit is x. Maple demands that I list the dummy variable of the integral as a parameter. How do I deal with that? BTW, Maple has no problem with plot (alpha(x), x=0..6) for example.

Hi, I am new to the Maple.

I have been trying to figure out this question:

Find the numerical (decimal) value of

f (ln (5π) + 2e5 + √ 4 + sin (4) ) 

 Here is what I wrote:

>f := ln(5*Pi)+2*e^5+sqrt(4+sin(4));
f := ln(5*Pi)+2*e^5+sqrt(4+sin(4))
>evalf(%);
4.555055775+2.*e^5

I got "4.555055775+2.*e^5" as my answer which is correct. However, I would perfer to get a decimal number like "301.381..."

Could anybody show me how?

The page ?type,piecewise shows the example

type(piecewise[](x < 1, a, b), 'piecewise');

and lines 4-8 of showstat(`print/piecewise`) deal with the case of an indexed piecewise. Yet I can find no other reference to indexed piecewise. What is it used for? When I put an index on a piecewise, nothing special seems to happen, either computationally or display-wise:

piecewise[abs](x > 0, x, -x);
piecewise[Carl](x > 0, x, -x);

The code in `print/piecewise` suggests that it serves some purpose.

system3d := a[1](a[1])+a[2]*a[4]+a[3]*a[7]-a[1](a[1])-a[2]*a[10]-a[3]*a[19], a[1]*a[2]-a[1]*a[2]+a[2]*a[5]-a[2]*a[11]+a[3]*a[8]-a[3]*a[20], a[1]*a[3]-a[1]*a[3]+a[2]*a[6]-a[2]*a[12]+a[3]*a[9]-a[3]*a[21], a[1]*a[4]-a[1]*a[4]-a[2]*a[13]-a[3]*a[22]+a[4]*a[5]+a[6]*a[7], a[2]*a[4]+a[5](a[5])+a[6]*a[8]-a[1]*a[5]-a[2]*a[14]-a[3]*a[23], a[3]*a[4]+a[5]*a[6]+a[6]*a[9]-a[1]*a[6]-a[2]*a[15]-a[3]*a[24], a[1]*a[7]+a[4]*a[8]+a[7]*a[9] = a[1]*a[7]+a[2]*a[16]+a[3]*a[25], a[2]*a[7]+a[5]*a[8]+a[8]*a[9] = a[1]*a[8]+a[2]*a[17]+a[3]*a[26], a[3]*a[7]+a[6]*a[8]+a[9](a[9]) = a[1]*a[9]+a[2]*a[18]+a[3]*a[27];
print(`output redirected...`); # input placeholder
a[2] a[4] - a[2] a[10] + a[3] a[7] - a[3] a[19],

a[2] a[5] - a[2] a[11] + a[3] a[8] - a[3] a[20],

a[2] a[6] - a[2] a[12] + a[3] a[9] - a[3] a[21],

-a[2] a[13] - a[3] a[22] + a[4] a[5] + a[6] a[7], a[2] a[4]

+ a[5](a[5]) + a[6] a[8] - a[1] a[5] - a[2] a[14] - a[3] a[23],
-a[1] a[6] - a[2] a[15] + a[3] a[4] - a[3] a[24] + a[5] a[6]

+ a[6] a[9], a[1] a[7] + a[4] a[8] + a[7] a[9] = a[1] a[7]

+ a[2] a[16] + a[3] a[25], a[2] a[7] + a[5] a[8] + a[8] a[9] =

a[1] a[8] + a[2] a[17] + a[3] a[26], a[3] a[7] + a[6] a[8]

+ a[9](a[9]) = a[1] a[9] + a[2] a[18] + a[3] a[27]

solve({system3d}, {a[1]*a[2], a[1]*a[3], a[1]*a[4], a[1]*a[5], a[1]*a[6], a[1]*a[7], a[1]*a[8], a[1]*a[9], a[2]*a[4], a[2]*a[5], a[2]*a[6], a[2]*a[7], a[2]*a[10], a[2]*a[11], a[2]*a[12], a[2]*a[13], a[2]*a[14], a[2]*a[15], a[2]*a[16], a[2]*a[17], a[2]*a[18], a[3]*a[4], a[3]*a[7], a[3]*a[8], a[3]*a[9], a[3]*a[19], a[3]*a[20], a[3]*a[21], a[3]*a[22], a[3]*a[23], a[3]*a[24], a[3]*a[25], a[3]*a[26], a[3]*a[27], a[4]*a[5], a[4]*a[8], a[5]*a[6], a[5]*a[8], a[6]*a[7], a[6]*a[8], a[6]*a[9], a[7]*a[9], a[8]*a[9], a[1](a[1]), a[5](a[5]), a[9](a[9])});
%;
Warning, solving for expressions other than names or functions is not recommended.
{a[1] a[2] = a[1] a[2], a[1] a[3] = a[1] a[3],

a[1] a[4] = a[1] a[4], a[1] a[5] = a[2] a[10] - a[3] a[7]

+ a[3] a[19] + a[5](a[5]) + a[6] a[8] - a[2] a[14]

- a[3] a[23], a[1] a[6] = -a[2] a[15] + a[3] a[4] - a[3] a[24]

+ a[5] a[6] + a[6] a[9], a[1] a[7] = a[1] a[7], a[1] a[8] = a[

2] a[7] - a[2] a[17] - a[3] a[26] + a[5] a[8] + a[8] a[9], a[1]

a[9] = a[3] a[7] + a[6] a[8] + a[9](a[9]) - a[2] a[18]

- a[3] a[27], a[2] a[4] = a[2] a[10] - a[3] a[7] + a[3] a[19],

a[2] a[5] = a[2] a[11] - a[3] a[8] + a[3] a[20],

a[2] a[6] = a[2] a[12] - a[3] a[9] + a[3] a[21],

a[2] a[7] = a[2] a[7], a[2] a[10] = a[2] a[10],

a[2] a[11] = a[2] a[11], a[2] a[12] = a[2] a[12],

a[2] a[13] = -a[3] a[22] + a[4] a[5] + a[6] a[7],

a[2] a[14] = a[2] a[14], a[2] a[15] = a[2] a[15],

a[2] a[16] = -a[3] a[25] + a[4] a[8] + a[7] a[9],

a[2] a[17] = a[2] a[17], a[2] a[18] = a[2] a[18],

a[3] a[4] = a[3] a[4], a[3] a[7] = a[3] a[7],

a[3] a[8] = a[3] a[8], a[3] a[9] = a[3] a[9],

a[3] a[19] = a[3] a[19], a[3] a[20] = a[3] a[20],

a[3] a[21] = a[3] a[21], a[3] a[22] = a[3] a[22],

a[3] a[23] = a[3] a[23], a[3] a[24] = a[3] a[24],

a[3] a[25] = a[3] a[25], a[3] a[26] = a[3] a[26],

a[3] a[27] = a[3] a[27], a[4] a[5] = a[4] a[5],

a[4] a[8] = a[4] a[8], a[5] a[6] = a[5] a[6],

a[5] a[8] = a[5] a[8], a[6] a[7] = a[6] a[7],

a[6] a[8] = a[6] a[8], a[6] a[9] = a[6] a[9],

a[7] a[9] = a[7] a[9], a[8] a[9] = a[8] a[9],

a[1](a[1]) = a[1](a[1]), a[5](a[5]) = a[5](a[5]),

a[9](a[9]) = a[9](a[9])}

 

 

 

the program runs however the warning message pops ...what can i do to eliminate the problem??? 

In Maple V, Release 4 (1996):

 

T:=table():
i:=1:N:=5000;

for i from i to N  
do
   T[i]:=T[i+1]:
   T[i+1]:=1;
   eval(T[1]);
od:
print(i);

for i from i to N  
do
   T[i]:=T[i+1]:
   T[i+1]:=1;
   eval(T[1]);
od:
print(i);

I receive this output:

N := 5000
Error, too many levels of recursion
3607
5001

Can You explain this occurence, as well as the following one:

In Maple V, Release 4 (1996):

 

T:=table():
i:=1:N:=5000;

for i from i to N  
do
  T[i]:=T[i+1]:
  eval(T[1]);
od:
print(i);
 
for i from i to N  
do
  T[i]:=T[i+1]:
  eval(T[1]);
od:
print(i);;

gives:

N := 5000
Error, too many levels of recursion
3607
Error, too many levels of recursion
3607

How does one control allowance for recursion depth?

Hi,

 

I am having trouble getting a pattern match to the Heaviside function.

patmatch(Heaviside(x), Heaviside(a::algebraic))

returns "false" whereas I would expect it to return true.

On the other hand:

patmatch(Heaviside(x), Heaviside(x::algebraic))

returns true.

 

What am I missing?

 

Regards.

 

2 3 4 5 6 7 8 Last Page 4 of 1359