AmirHosein Sadeghimanesh

110 Reputation

6 Badges

5 years, 252 days

Social Networks and Content at

Finished Ph.D. in Applied Algebraic Geometry in Biology and did postdoc in Mathematics of Chemical Reaction Networks, University of Copenhagen. Another postdoc in Nonlinear Dynamics in the Mathematical Models of Cell Biology at University of Szeged. Currently a research fellow at Coventry University. Main interests; Applied and Computational Algebraic Geometry, Mathematical Biology, Coding. I'm also a language lover! I'm also a language lover!

MaplePrimes Activity

These are answers submitted by AmirHosein Sadeghimanesh

@yangtheary I don't see what exactly you want to do with Maple for this question. But I follow my guess. Since you didn't specify which two edges of your triangle are equal, I check all three possibilities.

1- AC=BC: In this case D=C and we have ABD=ABC and since ABC=BAC, the answer is 20 degrees.

2- AB=BC: Since AD=BC, the triangle ADB also becomes isosceles. Then 2(?)+20=180 which implies ABD=?=80.

3- AB=AC: In this case, note that the triangle ABC can be uniquely determined by the assumptions of your question plus length of AD. And two cases for two different values of AD are geometrically similar (one is a scaled version of the other). Therefore the angles are the same and only size of edges are changed (by a multiplying to a fixed ratio). Now I fixed AD=1. Without loss of generality (at most with a geometric translation and rotation which none of them change the size of angles and edges) assume that A=(0,0) and AC is on the positive side of the x-axis. Then it's trivial that D=(1,0) and the AB edge is on the line y=tan(20)*x. The point C is (xC,0) which we yet don't know the value of xC. The line which BC is on it, is y=-tan(80)*(x-xC). The point B is the unique point on the intersection of the two lines and with the distance 1 from C. Therefore we need to solve the following system of equations. Here I use Maple. Just note that B is on these two lines, by considering one of them, say the first one, we have B=(xB,tan(20)*xB). Therefore we have two equations and two unknowns.


Now we have the coordinates of both B and C. But knowing B is enough for us. Again using Maple we compute the arctan of ABD. To this end, just choose an arbitrary point on one of the two edges of this angle, say D from BD, then project it on the other edge. Call this new point M. Then tan(ABD)=(distance of M and D)/(distance of M and AB). The wollowing Maple computations is related to all these steps. To find M, we first found distance of M from the line of AB. Then solved an equation determining the unique point on line of AB with the found distance from M.


So the answer in the case of AC=AB is (almost) 10 degrees.

I also put the plot of my above code below.

If you are looking at your integrand function as a complex-valued function, then the others already had answered your question. Now, if you are thinking about your integrand expression as a real-valued function on its domain, then see the following. (maybe that is the reason that you didn't upvote the other answer, just as a guess)

The plot of the integrand expression is as the folloeing.


To make it possible to calculate the area below the diagram of the expression on the area it is defined, just modify the integrand so that it is zero wherever the original expression is undefined. Here the problem is when below the radical becomes negative. So let's add a max(0,...) under the radical.


Or remove "numerc" option and add "evalf" at the beginning. Anyway, then the answer is 0.3815374557.

The others answered what you explained in the body of your question. But for someone who comes to this page because of the title of your question (which I believe is not a super suitable title for yout question), I'm writing the following.


So assume you have a 1 dimensional array and want to append an element at the end of the array. You can use info about number of elements in your array or just use the ArrayTools:-Append. Let's make it more clear by an example, say you already have an array called myArray. You may know that it has n elements, then use the following line to add your new element, say newElement;


You don't rememeber the number of elements in myArray or it may change in a loop etc, then use numelems which counts it for you.


But I don't think it is a very good idea to count the number of elemetns each time. I suppose the predefined codes of Maple are optimized so I would go for ArrayTools:-Append. As in below.


One more thing. In a comment to another answer you said that when you ask a range of elements of your array to be printed you see something that doesn't look like what you expect. You tried something like myArray[2..4]. Try myArray(2..4) which shows the result as a brackets containing the elements you want without the word Array etc. So just use paranthesis instead of brackets for the porpuse of just seeing some elements of the Array.


Now going back to your question, you want to add an element at the end and delete an element at the beginning. For deleting an element from a 1 dimensional array which is currently located at the i-th position from left to right, you can use ArrayTools:-Remove. Let's pick up our previous example, other than adding newElement at the end of the array, we want to delete the first element at the beginning of the array as well. So you can type the following.


I don't know if changing the order of adding and removing will make any difference in the efficiency of the code.

Since you're working with a monomial it's easy.

for i in F do
end do:

As an example ans for f:=j[0]^4*j[11]*j[15]^2 will be 41.

Page 1 of 1