## dharr

Dr. David Harrington

## 5973 Reputation

19 years, 300 days
University of Victoria
Professor or university staff

## Social Networks and Content at Maplesoft.com

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.

## SCR...

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

## Which PDE?...

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

## what type of plot?...

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

## works...

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

 >
 >

 >

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

 >

We want cos(theta[2])

 >

In terms of qx and qy

 >

 >

## NullSpace...

@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

## N+1 and i<>j...

@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})`

## loop...

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

sim_plot.mw

## bug fixed...

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

## no solution...

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

## incomplete...

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

## no simple solution...

@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

## worksheet?...

@J4James Hard to diagnose without a worksheet.

## symbolic solution...

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

## not within Maple...

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

## calculation domain...

@vv Thanks. As you see, I tried solve but assumed that it worked in the complex domain, as is generally true for Maple. Now I check the help for solve,ineq I see the restriction is stated.

So:

is(p1,nonnoegative) works in the complex domain

solve(p1>=0) works in the real domain (and gives answers that are incorrect in the complex domain)

solve(p1=0) works in the complex domain.

Very confusing, and close to a bug IMO. Perhaps solve(p1>=0) should give a warning.

While I expect that in math, p>0 implies p is real, I don't expect that x^2<0 precludes x=I.

 First 38 39 40 41 42 43 44 Last Page 40 of 62
﻿