C_R

3412 Reputation

21 Badges

5 years, 320 days

MaplePrimes Activity


These are replies submitted by C_R

@sursumCorda 

f__5 is structurally the most ordered result of all: Only one RootOf left and only one root per list element!

👍👍

 

@sursumCorda 

I just tried it to get a better overview myself.
It seems that the complexity driver is the nested RootOf expression

The squared term inside the outer RootOf probably contributes to the high number of counted leafs.

The attempted simplifications left r1 untouched which is maybe not so obvious at a first glance for others from your original doccument.

I would be interested to learn if there is a way from the 2 roots in f0 to the 6 index roots in f4.

fully_simplify_f_0_with_alias.mw

@acer 

After System restart, I checked Maple.ini for any alias entries. There was nothing suspicious.

Also renaming Maple.ini to _Maple.ini did not change anything. (No startup code and no libraries were loaded)

Are there other initialization files that could cause the trouble?

What I did then was:

Loading the latest attachment above -> inserting and excecuting an alias statement at the begining -> saving the file (attached below)

When I load this new flie and excecute it with lessthan is gone.

If I excecute the file stepwise with lessthan reaperas as before after the plot.

The whole thing reminds me of an observation I made here

alias_with_lessthan_output_02.mw

@acer 

When I open the uploaded document above without executing anything I get

after entering alias() at the bottom of the document.

All than on Windows 11.

Below another atempt of uploading just in case

alias_with_lessthan_output.mw

@sursumCorda 

Your solution of using Maple is unexpected and surprised me!  Thank you

It can easily be used in this sequence:

Step 0: Locate the file of a model in its folder and open it by double click.

Step 1: Lauch Maple from within MapelSim (no adding or setting the file path, which is always a hassle)

Step 2: Replace the filename of the model in your command

 

@ Maplesoft: If there is no better way, I suggest to insert this information in the version_update attachment here.
Its usefull information when working with older files without history.

 

@delvin 

I get the error with 2022. If you can I would use 2023.

With 2022 FF still has Psi in a ln term.

@delvin

You are welcome.

I cannot reproduce the error. Which version did you use?

restart;

interface(version)

`Standard Worksheet Interface, Maple 2023.0, Windows 10, March 6 2023 Build ID 1689885`

(1)

with(student):

U := a[0] + sum(-a[i]*tanh(xi[n])^i, i = 1 .. 1) + sum(-b[i]*tanh(xi[n])^(-i), i = 1 .. 1):

u(xi[n + 1]) := a[0] - a[1]*(tanh(xi[n]) + tanh(d))/(1 + tanh(xi[n])*tanh(d)) - b[1]*(1 + tanh(xi[n])*tanh(d))/(tanh(xi[n]) + tanh(d)):

u(xi[n - 1]) := a[0] - a[1]*(tanh(xi[n]) - tanh(d))/(1 - tanh(xi[n])*tanh(d)) - b[1]*(1 - tanh(xi[n])*tanh(d))/(tanh(xi[n]) - tanh(d)):

eq := c[1]^2*diff(U, xi[n], xi[n])*ln(1 + U/alpha) - beta*(u(xi[n + 1]) - 2*U - u(xi[n - 1])):

fin1 := simplify(numer(eq));

2*sech(xi[n])^2*c[1]^2*(tanh(d)*sech(xi[n])^2-tanh(xi[n])*sech(d)^2)*(tanh(d)*sech(xi[n])^2+tanh(xi[n])*sech(d)^2)*(tanh(xi[n])^4*a[1]-b[1])*ln((-a[1]*tanh(xi[n])+alpha+a[0]-b[1]*coth(xi[n]))/alpha)-2*beta*tanh(xi[n])^2*(-a[1]*sech(d)^4*tanh(xi[n])^4+(-tanh(d)*sech(xi[n])^2*b[1]*sech(d)^2+a[0]*sech(d)^4)*tanh(xi[n])^3+(tanh(d)^2*sech(xi[n])^4*a[1]-b[1]*sech(d)^4)*tanh(xi[n])^2-((tanh(d)*a[0]+a[1]+b[1])*sech(xi[n])^2-a[1]*sech(d)^2)*tanh(d)*sech(xi[n])^2*tanh(xi[n])+tanh(d)^2*sech(xi[n])^4*b[1])

(2)

fin := simplify(subs(tanh(xi[n]) = Psi, fin1));

-2*sech(xi[n])^2*c[1]^2*(-tanh(d)*sech(xi[n])^2+Psi*sech(d)^2)*(tanh(d)*sech(xi[n])^2+Psi*sech(d)^2)*(Psi^4*a[1]-b[1])*ln((-a[1]*Psi+alpha+a[0]-b[1]*coth(xi[n]))/alpha)+2*Psi^2*beta*(-(tanh(d)*(Psi^2*a[1]-Psi*a[0]+b[1])-Psi*(a[1]+b[1]))*tanh(d)*sech(xi[n])^4+sech(d)^2*tanh(d)*Psi*(Psi^2*b[1]-a[1])*sech(xi[n])^2+sech(d)^4*Psi^2*(Psi^2*a[1]-Psi*a[0]+b[1]))

(3)

degree(fin,Psi)

FAIL

(4)

FF:=convert(series(fin,Psi,7),polynom):

degree(%,Psi)

6

(5)

for i from 0 to degree(FF, Psi) do
    EQ[i] := simplify(coeff(FF, Psi, i));
end do

-2*sech(xi[n])^6*c[1]^2*tanh(d)^2*b[1]*ln((alpha+a[0]-b[1]*coth(xi[n]))/alpha)

 

2*sech(xi[n])^6*c[1]^2*tanh(d)^2*b[1]*a[1]/(alpha+a[0]-b[1]*coth(xi[n]))

 

b[1]*(a[1]^2*c[1]^2*tanh(d)^2*sech(xi[n])^6/(b[1]*coth(xi[n])-alpha-a[0])^2+2*sech(xi[n])^2*c[1]^2*sech(d)^4*ln((alpha+a[0]-b[1]*coth(xi[n]))/alpha)-2*beta*tanh(d)^2*sech(xi[n])^4)

 

(2/3)*b[1]*a[1]^3*c[1]^2*tanh(d)^2*sech(xi[n])^6/(alpha+a[0]-b[1]*coth(xi[n]))^3-2*sech(xi[n])^2*c[1]^2*sech(d)^4*b[1]*a[1]/(alpha+a[0]-b[1]*coth(xi[n]))+2*(a[0]*tanh(d)*sech(xi[n])^2+(a[1]+b[1])*sech(xi[n])^2-a[1]*sech(d)^2)*beta*sech(xi[n])^2*tanh(d)

 

(1/2)*b[1]*a[1]^4*c[1]^2*tanh(d)^2*sech(xi[n])^6/(alpha+a[0]-b[1]*coth(xi[n]))^4-b[1]*a[1]^2*c[1]^2*sech(d)^4*sech(xi[n])^2/(alpha+a[0]-b[1]*coth(xi[n]))^2+2*sech(xi[n])^6*c[1]^2*tanh(d)^2*a[1]*ln((alpha+a[0]-b[1]*coth(xi[n]))/alpha)+2*beta*(-tanh(d)^2*sech(xi[n])^4*a[1]+b[1]*sech(d)^4)

 

(2/5)*b[1]*a[1]^5*c[1]^2*tanh(d)^2*sech(xi[n])^6/(alpha+a[0]-b[1]*coth(xi[n]))^5-(2/3)*b[1]*a[1]^3*c[1]^2*sech(d)^4*sech(xi[n])^2/(alpha+a[0]-b[1]*coth(xi[n]))^3-2*sech(xi[n])^6*c[1]^2*tanh(d)^2*a[1]^2/(alpha+a[0]-b[1]*coth(xi[n]))-2*beta*sech(d)^2*(-b[1]*tanh(d)*sech(xi[n])^2+a[0]*sech(d)^2)

 

(1/3)*b[1]*a[1]^6*c[1]^2*tanh(d)^2*sech(xi[n])^6/(alpha+a[0]-b[1]*coth(xi[n]))^6-(1/2)*b[1]*a[1]^4*c[1]^2*sech(d)^4*sech(xi[n])^2/(alpha+a[0]-b[1]*coth(xi[n]))^4-a[1]^3*c[1]^2*tanh(d)^2*sech(xi[n])^6/(alpha+a[0]-b[1]*coth(xi[n]))^2-2*sech(xi[n])^2*c[1]^2*sech(d)^4*a[1]*ln((alpha+a[0]-b[1]*coth(xi[n]))/alpha)+2*beta*a[1]*sech(d)^4

(6)

Eqs := {seq(EQ[i]=0, i = 0 .. 6)}

{b[1]*(a[1]^2*c[1]^2*tanh(d)^2*sech(xi[n])^6/(b[1]*coth(xi[n])-alpha-a[0])^2+2*sech(xi[n])^2*c[1]^2*sech(d)^4*ln((alpha+a[0]-b[1]*coth(xi[n]))/alpha)-2*beta*tanh(d)^2*sech(xi[n])^4) = 0, -2*sech(xi[n])^6*c[1]^2*tanh(d)^2*b[1]*ln((alpha+a[0]-b[1]*coth(xi[n]))/alpha) = 0, 2*sech(xi[n])^6*c[1]^2*tanh(d)^2*b[1]*a[1]/(alpha+a[0]-b[1]*coth(xi[n])) = 0, (2/3)*b[1]*a[1]^3*c[1]^2*tanh(d)^2*sech(xi[n])^6/(alpha+a[0]-b[1]*coth(xi[n]))^3-2*sech(xi[n])^2*c[1]^2*sech(d)^4*b[1]*a[1]/(alpha+a[0]-b[1]*coth(xi[n]))+2*(a[0]*tanh(d)*sech(xi[n])^2+(a[1]+b[1])*sech(xi[n])^2-a[1]*sech(d)^2)*beta*sech(xi[n])^2*tanh(d) = 0, (1/2)*b[1]*a[1]^4*c[1]^2*tanh(d)^2*sech(xi[n])^6/(alpha+a[0]-b[1]*coth(xi[n]))^4-b[1]*a[1]^2*c[1]^2*sech(d)^4*sech(xi[n])^2/(alpha+a[0]-b[1]*coth(xi[n]))^2+2*sech(xi[n])^6*c[1]^2*tanh(d)^2*a[1]*ln((alpha+a[0]-b[1]*coth(xi[n]))/alpha)+2*beta*(-tanh(d)^2*sech(xi[n])^4*a[1]+b[1]*sech(d)^4) = 0, (2/5)*b[1]*a[1]^5*c[1]^2*tanh(d)^2*sech(xi[n])^6/(alpha+a[0]-b[1]*coth(xi[n]))^5-(2/3)*b[1]*a[1]^3*c[1]^2*sech(d)^4*sech(xi[n])^2/(alpha+a[0]-b[1]*coth(xi[n]))^3-2*sech(xi[n])^6*c[1]^2*tanh(d)^2*a[1]^2/(alpha+a[0]-b[1]*coth(xi[n]))-2*beta*sech(d)^2*(-b[1]*tanh(d)*sech(xi[n])^2+a[0]*sech(d)^2) = 0, (1/3)*b[1]*a[1]^6*c[1]^2*tanh(d)^2*sech(xi[n])^6/(alpha+a[0]-b[1]*coth(xi[n]))^6-(1/2)*b[1]*a[1]^4*c[1]^2*sech(d)^4*sech(xi[n])^2/(alpha+a[0]-b[1]*coth(xi[n]))^4-a[1]^3*c[1]^2*tanh(d)^2*sech(xi[n])^6/(alpha+a[0]-b[1]*coth(xi[n]))^2-2*sech(xi[n])^2*c[1]^2*sech(d)^4*a[1]*ln((alpha+a[0]-b[1]*coth(xi[n]))/alpha)+2*beta*a[1]*sech(d)^4 = 0}

(7)

 

Download 02_-_2023_no_error.mw

Maple 2021 seems to run on Windows 11.

https://www.mapleprimes.com/questions/233049-Has-Anyone-Try-Using-Maple-2021-In-Window-11-

This does not mean that 2020 will run similarly, as Maple 2021 uses a different Java platform than 2020. 

How is the mass distributed?

Rolling means no slippage possible?

@acer 

The progress bar is nice! It seems that there are some possibilities for the advanced user.

For beginners there should be something simple (easy to find/discover, understand and to use) when starting with loop statements in Maple. It does not have to be perfect.

A console window would be a great supplement to a simple solution. I would prefer separate windows.

I believe most people would prefer a solution where the output appears in a text area after the loop, ideally where repeated output from a loop typically appears. Something like that

restart;

with(DocumentTools):

with(DocumentTools:-Components):

with(DocumentTools:-Layout):

s := "0":

T := TextArea(s, identity = "TextArea0"):
xml := Worksheet(Group(Input(Textfield(T)))):

#insertedname:=InsertContent(xml)[1,1]:

box_printed:=false:
for i to 10 do
if (not(box_printed))then
   insertedname:=InsertContent(xml)[1,1]:
   box_printed:=true:
end if:
Threads:-Sleep(1);

DocumentTools:-SetProperty(insertedname,value,sprintf("%d",i),refresh=true);
end do:

Maplets:-Examples:-Message("Done");

Can't one of the print commands be modified to do this (i.e. avoid a line feed)? This would be much easier than learning DocumentTools.

At least there is a solution that would not have occurred to me. 👍

Download text-area-update-progress_after_loop.mw

L as used in line 3 is of dimension time. In line 4 you want L to be zero when the time is between 1 and 2 (days?).

Otherwise you want L, which is of dimension time, to be C, which is probably of a different dimension.

What you probably want is to define a piecewise function for C:

C:=piecewise(time condition,first concentration dosage 1, concentration dosage 1 + concentration dosage 2) where concentration of dosage 2 is timeshifted.

Concering C: Do you really want C to be a product of a constant and a time depended exponential term?

there is an Error before the plot comand

@tomleslie 

Its a single element list exported from

It looks like I have always been removing brackets from expressions when working manually, without realizing that it is a requirement for using isolate.

Thank you all for the quick response!

@Maxie 

You could try to adopt the following for your problem

https://www.mapleprimes.com/posts/220877-Ball-Bouncing-On-A-Flexible-Beam

 

First 47 48 49 50 51 52 53 Last Page 49 of 67