dharr

Dr. David Harrington

1811 Reputation

13 Badges

16 years, 292 days
University of Victoria
Professor or university staff
Victoria, British Columbia, Canada

Social Networks and Content at Maplesoft.com

Maple Application Center
I am a professor of chemistry at the University of Victoria, BC, Canada, where my research areas are electrochemistry and surface science. I have been a user of Maple since about 1990.

MaplePrimes Activity


These are replies submitted by dharr

@mmcdara You say "On the link  https://www.mapleprimes.com/help/moderation there is no mention of a moderator's right to edit another person's response," but that is not my reading of it - it says "please be *very* careful when editing someone’s message," and speaks about "being able to edit your own messages as well [my bold]". I agree it is open to abuse, but as I said that tends to be rare. You need a reputation of 500 to get to moderator, and although that really says nothing absolute about one's ethics, it probably does imply some dedication to the community. I am assuming that if some impoper editing happens, and Maple is made aware of that they can restore a message from a backup.

I'm not in favour of asking an OP if they want to allow a change, since this would allow them to leave copyrighted or offensive material up. I think in many cases where questions and followup answers have suddenly disappeared it is done by the original poster, who has got the answer to their assignment and now wants to remove the evidence of academic misconduct. Sometimes questioners complain, but mostly that is explained by duplicate or similar questions.

- and yes, I was not serious in my comment about your "transgression" since I knew you were being cautious.

@nm To make a bug report, just use the Mapleprimes "more" tab and choose "submit software change request"

@saher There is a PDE in your worksheet that you solve with pdsolve. So if that's not what you want you will need to be more specific about what exactly you want to do.

You used invElziki when it was defined as invEl, but I really don't understand what you want to plot. Your Elzikisol is a function of x that returns something with y in it. So you need to specify y before you can do a 2D plot. Not clear why you are plotting this twice. Perhaps you want a 3D plot?

pde_elziki.mw

@Amir Saman Mir Not sure what happened; I get the right answer.

restart

invEqs := [a[3]*cos(theta[1]+theta[2]+theta[3])+a[2]*cos(theta[1]+theta[2])+a[1]*cos(theta[1]) = px, a[3]*sin(theta[1]+theta[2]+theta[3])+a[2]*sin(theta[1]+theta[2])+a[1]*sin(theta[1]) = py, theta[1]+theta[2]+theta[3] = phi]

[a[3]*cos(theta[1]+theta[2]+theta[3])+a[2]*cos(theta[1]+theta[2])+a[1]*cos(theta[1]) = px, a[3]*sin(theta[1]+theta[2]+theta[3])+a[2]*sin(theta[1]+theta[2])+a[1]*sin(theta[1]) = py, theta[1]+theta[2]+theta[3] = phi]

q := [solve(invEqs, {theta[1], theta[2], theta[3]}, explicit)]

Two solutions - try each below - both give the same answer for cos(theta[2])

nops(q)

2

We want cos(theta[2])

c := simplify(eval(cos(theta[2]), q[1]))

(1/2)*(-2*cos(phi)*px*a[3]-2*py*sin(phi)*a[3]+px^2+py^2-a[1]^2-a[2]^2+a[3]^2)/(a[2]*a[1])

In terms of qx and qy

simplify(eval(c, {px = qx+a[3]*cos(phi), py = qy+a[3]*sin(phi)}))

(1/2)*(qx^2+qy^2-a[1]^2-a[2]^2)/(a[2]*a[1])

NULL

 

Download theta.mw

@tarik_mohamadi NullSpace(R1) leads to nonzero entries for only entry 5 and 7, showing that columns 5 and 7 are multiples of each other.

Determinant.mw

@lemelinm Sorry, I don't really understand what you are asking. You wanted Maple to do it automatically, and it does. You must have i<>j to fit a polynomial - if you had two y values for the same x value then it is not a function, and it cannot be a polynomial. If you try the i=j case, with two x values the same, then Maple correctly produces an error.

Interpolation of higher order polynomials will not be unique and they will tend to oscillate, so that is usually not useful.

You can construct your l_i(xi) by, for example

n:=4:i:=3:mul((xi-x[j])/(x[i]-x[j]), j in {$1..n} minus {i})

 

@ogunmiloro If you want values every 0.1 you can just set up a loop:

sim_plot.mw

@MPM2357 This is great - the bug has been fixed in 2021.0. I was using 2017. Note the general solution you got has sin(Pi*n*(r-1))=sin(Pi*n*r), but Maple 2017 got sin(2*Pi*n*r), I should have looked more carefully at your output before I ran the worksheet. So your general solution was the sum over n of sol4 (eq8), so you could start from that point directly. 

@Pepini Even without the IC there is no general solution. I think abs is a problem here. Perhaps there are some manipulations that could be done, like separating into magnitude and phase, but you probably need to know where you are headed.

The line assigning to pe is incomplete - it ends in ^

@J4James So there is no explicit solution for this. So the best you can do is to use unapply to make a function (procedure) out of it, and then use it for numerical work. The plot shows though, that the equation has multiple solutions and it is jumping from one to another, though perhaps it doesn't for the range of H you want.

In principle, you can use evalindets to alter the RootOf's to the form of RootOf which supplies a range to force the right root, but you need to know what its approximate value is. Or probably easier to use fsolve earlier, forcing the right roots by specifying ranges.

eta(H)sheet2.mw

@J4James Hard to diagnose without a worksheet.

@J4James The RootOf suffices for numerical work. If you instead want an analytical solution, you might be able to get one using the "explicit" option in solve. Normally, if you want an analytical (symbolic) solution, you would do the manipulatiions and solving without putting in floating point numerical values, and then put these in at the end.

@AmirHosein Sadeghimanesh  You asked for commands within Maple, and these come the closest to what you asked for. I mentioned them in case you wren't aware of them. So within Maple, I think there are no such features. There may be outside code editors - I don't know much about VSCode. Notepad++ has a Maple plugin, but I haven't used it. There may be others; perhaps others can provide suggestions.

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