## 1157 Reputation

12 years, 154 days

## What would you suggest?...

@Carl Love Ok. Good advice, that could cause some real problems. I guessed what I was trying wouldn't be recommended. What would you do to store a series of values etc, generated in a loop? I am also a using the equations Pedal||i later.

## Excellent. And a question or two....

@tomleslie  Thank you that works very well.
At several places, you have these brackets [ ]. What do they do?  How do you achieve the formatting of your code?

.

## Remove that line....

@Ramakrishnan   Sorry. I meant to remove that line. There is a procedure at the start called Trunc. It is normally stored in my package called RonanRoutines. I copied and pasted it into the doc so it should work for you. Am at work so will check tonight.

## # that line out...

@Christian Wolinski  Sorry. I meant to remove that line. There is a procedure at the start called Trunc. It is normally stored in my package called RonanRoutines. I copied and pasted it into the doc so it should work for you.

## Thank you....

@Christian Wolinski Thank you. Very workable. I would love to give you best answer, thumbs up. They are not available.

## Nice....

@Joe Riel That is nice proc and a big step towards the end goal. At this point, I am going to start a new question on reducing the equations as this one was primarily about plotting.

## A common problem....

@Joe Riel Thank you. I have the same problem. I can't figure out how to get Maple to reduce (x^2 + y^2 -1)^2 to  x^2 + y^2 -1. I am trying to find a way to do this automatically. Do you have any ideas on how to?  It could be for example  (x^2 + y^2 -1)^6.  I just picked the circle equation as a representative example.

Another good example is; because it has no constant term.

`(-27*x^2*y^2-27*y^4+4*x^3)^2`

## Very powerful, Could you explain a coupl...

Christian Wolinski Very nice and powerful. I was just going to post a similar question. I have a couple of questions and a problem.

The code doesn't seem to need Y or am I missing something?

k doesn't match my variable x but it works with k?

I found a situation where it returns a squared version of the desired answer. Is there a way around this?

 (1)

 (2)

 (3)

 (4)

 (5)

Works without Y

 (6)

 (7)

 (8)

 (9)

This next one leaves the equation  squared

 (10)

 (11)

expand doesn't fix the problem.

 (12)

 (13)

## Question re. trig. functions...

@acer That is great. So useful. Is there a way to extend the functionality to handle for example trig functions? I multiplied one side by sin(x) and the other by tan(x).

```fact := proc (expr::equation) options operator, arrow; frontend(gcd, [numer(lhs(expr)), numer(rhs(expr))])/frontend(gcd, [denom(lhs(expr)), denom(rhs(expr))]) end proc;
eq1 := F*R = (1/2)*M*R^2*(a/R); eq1/fact(eq1);
eq2 := (F+G)*R*sin(x)/sqrt(W-1) = (1/2)*M*R^2*tan(x)*(a/(R*sqrt(W-1)));
fact(eq2); eq2/fact(eq2)

(F+G)*sin(x) = (1/2)*M*tan(x)*a
```

## Ok I didn't know that....

@Carl Love I found that line of code here on Maple Primes as a stand alone way to truncate an equation.

`map(select, proc (q) options operator, arrow; evalb(degree(q, b) <= odr) end proc, a)`

I put it inside the  procedure.

I see that yours works alone too.

`select(proc (q) options operator, arrow; evalb(degree(q, [x, y]) <= 2) end proc, E2)`

Thank you,

## Ok..but that requires knowing the answer...

@Kitonum That is some nice disassembly of the function in Addition 2.

In Addition 1 I found using the inert form Sum and then setting u=v gives the correct evaluation of the limit.

I was originally trying to convert that expression automaticially to the sum for an abrtitary m. An example of something similar is   which assuming n>m can be represented as  but outside of actual numbers I can't get Maple to factor to that. That then evaluates to .

These functions are rather elementry and I am surprised Maple doesn't seem handle this.

In the original document I attached, I notice something odd with

The second sum is from 0 to infinity. How could that be?
Edit:- How do you do those nice grey sections where you display your code?

## Good. Simplifies how to get the final an...

@Kitonum  I like that. I haven't used 'limit' before. Will pay more attention to it in future. I am still interested in how to make Maple produce the sum.

## Resaon for is...

@tomleslie Yes I understand your point. In reality the matrix is being generated row by row and checked for the condition of M[i,1]<>M[1,1]. Does not necessarily happen though solimit loop to some upper value.

or else it keeps running.

## Well yes.....

@vv Of course it would be probably hard to beat the Maple code. I was wondering if there was possibly some recursive approach.

 First 17 18 19 20 21 22 23 Last Page 19 of 28
﻿