C_R

3537 Reputation

21 Badges

6 years, 60 days

MaplePrimes Activity


These are replies submitted by C_R

@vv 

IMO it should because it converts without ICs to the expected from.

odetest((lhs-rhs)(mysol),ode);

If this was intentionally implemented it should also work with ICs.

I would report it as a product improvement.

The reduction in size is impressive.
 👍

When plotting, some smart_int results differ from Maples default output. Which one to chose?
The choice is probably less imporant in the context of ODEs since integration constants must be determined anyway

x*arctan(x)^2*ln(x^2+1);
simplify(int(%,x)-smart_int(%,x)):
plot(%,x=-Pi..Pi);
x/(-x^2+5)/(-x^2+3)^(1/2);
simplify(int(%,x)-smart_int(%,x));
plot(%,x=0..Pi);

 

 

@Carl Love 

Elegant but not fully clear to me. Can you explain the yellow part and its purpose?


I understand

type([[-2.71396014591046, 0], [-2.66663223217829, 0], [-2.66663223217829, 0.0132214378482131], [-2.71396014591046, 0.0132214378482131]],4 &under nops)

Here is what I do not

[[-2.71396014591046, 0], [-2.66663223217829, 0], [-2.66663223217829, 0.0132214378482131], [-2.71396014591046, 0.0132214378482131]] &under nops;
eval(%);# tried also value...

How should I read the code?

an expression of "type listlist(numeric) having 4 operands"

or

an expression of type listlist(numeric) and of type 4 under application of nops

I analysed:

Statistics:-TallyInto(
        A, 
        map(
            b-> b[1,1]..b[2,1],
            [indets(op(1,Q), And(listlist(numeric), 4 &under nops))[]]))

 

@aroche 

Thank you for the fix and the explanations. Very helpful.

@Ronan 

Yes, I wanted to give a nicer alternative for the second code line but forgot to mention that intersect has to be used

indets(eqn) minus indets(eqn,name);
% intersect indets(eqn, `^`);
rpl:=[A,B,C,`&D;`,E,F]:
Subs2:=[seq(subexpr[i]=rpl[i], i=1..nops(subexpr))]:
simplify(subs(Subs2,eqn));

@Ronan 

In my example I showed a complicated way to filter for roots and powers because I could not find this straight away:

indets(a+sqrt(b), `^`)

Looks to me that the solution Maple finds is not compatible with the IC

infolevel[dsolve]:=5;
dsolve(ode);
subs(x=0,ic,%);
%/(-2);
tan(lhs(%))=tan(rhs(%))

I remember a similar case we discussed but cannot find it right away.

@acer 

Thank you very much for the answers. Very satisfying!

@acer 

Does this mean that when I see "enter unknown" Maple refers exclusively to an anonymous procedure? In the below Maple seems to assign a "procedure without name" to the name "unknown".Is this intentional or an unfortunate coincidence?

@Carl Love 

Probably the way to go. If I understand correctly, there are command specific extenstion rules.  

?simplify,details is silent about any details in which order options are processed.

Without knowing them I cannot expect 

simplify(expr,Maple_proc1,My_proc,Maple_proc2)

to process from left to right.

Thanks for the one-liner. Always a pleasure to see those.

@Carl Love 

I do not get a plot from the above code

@acer I used 2024. With 2023 I have to paste to 1D to make it work

@Muhammad Usman 

Your code is hard to debug because it is not included in a procedure. Without enclosing the code in a procedure Maple's debugger can't be used with its full functionality.

What I have found out so far:

The loop "freezes" at j=3 and i=4 when it either

tries to compute t[3] (which does not happen 
t=", table([0 = 0.6, 1 = 0.002959600326977772952816587148, 2 = 0.0183359320842630459466068924070])    )

or continues without having a numeric value for t[3].

In the second case (which I assume is the most likely) Maple tries to continue with expressions with the indexed name t[3] that does not evaluate to a value. In this case it is not a true freeze but Maple continues with something it cannot finish fast ennough that code errors are visible in the output.

Maybe this helps already. Otherwise I suggest to include the code into a procedure.  

@Carl Love

I see your point but from a user perspective it makes sense to talk about simplifying equations with a certain result in mind.

In this sense I got caught out by "natural language" again when I opted for an extension of simplify. I should have thought of convert or even better isolate in the first place.>

Unsure about my extended use of simplification I asked language models “in math: what is simplification of an equation?” and I got these answers

Simplification of an equation in mathematics refers to the process of rewriting the equation in a simpler or more concise form without changing its solutions. The goal is to make the equation easier to work with or solve … Simplification makes solving equations more manageable and often provides a clearer view of the relationships between variables. (ChatGPT, based on OpenAI's GPT-4 architecture).

… Here's a key takeaway: While simplification in expressions often involves significant transformations, simplification in equations is more about rearranging terms and isolating the variable to gain a clearer understanding of the relationship it represents. (Gemini, no version)

(An observation without drawing any conclusions: Training data sets of both models reflect somehow how people talk and write after school.)

I am getting here of topic but thank you for your feedback.

@Muhammad Usman 

It's still not working. What happens if you cklick on the link?

First 27 28 29 30 31 32 33 Last Page 29 of 69