C_R

2165 Reputation

19 Badges

4 years, 252 days

MaplePrimes Activity


These are replies submitted by C_R

@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?

@acer 

I try to understand the extension mechansim and what it could be good for. In the context of simplify I thought by defining a special procedure the flow of simplification steps could be controlled this way

simplify(expr,Maple_proc,My_proc,Maple_proc)

and by doing so several code lines could be saved.  

Independend from the fact that simplification of equations is not well defined (could be anything) I would have expected from ?simplify,details that only the procedure My_proc is executed because the help page states:

 "Invokes only the simplification procedures specified by the additional names." 
As I see it now, before invoking the procedure there is some preprocessing going on. And this might be annother reason to use command extensions instead of defining an independend procedure.

 

Here is annother example with differnt output that I do not understand

expr:=1/sqrt(2);                            
`simplify/sqrt2` := x -> subs(1/2*sqrt(2) = 1 %/ sqrt(2), x):
simplify(expr, sqrt2);
`convert/sqrt2` := x -> subs(1/2*sqrt(2) = 1 %/ sqrt(2), x):
convert(expr,sqrt2);
                                1  (1/2)
                        expr := - 2     
                                2       

                            1  (1/2)
                            - 2     
                            2       

                           /    (1/2)\
                         %/\1, 2     /

Thank you for the clarification.

@Muhammad Usman 

I still get this

Make sure that your have deleted old links and upload again with 

@Muhammad Usman 

Can you repost the file. I get a page not found message when I click on it.

1 2 3 4 5 6 7 Last Page 1 of 41