dharr

Dr. David Harrington

8837 Reputation

22 Badges

21 years, 121 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 retired professor of chemistry at the University of Victoria, BC, Canada. 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

@MDD It is not possible to go back. For the non-derivative terms the information about the function of x has been discarded. Even for the derivative terms, they could be squared or other powers and still have the same coefficient. 

@MDD I think this covers all the cases. Only x is treated as a variable in the non-derivative terms. Note that e*(x-1) gives two terms because it is the same as e*x-e.

restart

ode := diff(y(x), x, x, x) = (c-1)*(diff(y(x), x, x))-2*a*(diff(y(x), x))+b*x^3+sin(x)-a*c

diff(diff(diff(y(x), x), x), x) = (c-1)*(diff(diff(y(x), x), x))-2*a*(diff(y(x), x))+b*x^3+sin(x)-a*c

ode_to_poly:=proc(ode,fn::function)
  local ode1,cfs,lastterms,withx,withoutx,vars,xvar,i,dummy,zz;
  xvar:=op(1,fn);
  if type(ode,`=`) then ode1:=rhs(ode) - lhs(ode) else ode1:=ode end if;
  cfs := [PDEtools:-dcoeffs(ode1,fn)];
  lastterms := [op(expand(cfs[-1] + dummy))];
  withx, withoutx := selectremove(has, lastterms, xvar);
  withx:=map(zz->if type(zz,`*`) then remove(has,zz,xvar) else 1 end if, withx);
  cfs := [cfs[1 .. -2][], withx[]];
  vars := [seq(cat(A, i), i = 1 .. nops(cfs))];
  add(cfs[i]*vars[i], i = 1 .. nops(cfs)) + subs(dummy = 0, add(i,i in withoutx));
end proc:NULL

ode_to_poly(ode, y(x))

-A1+(c-1)*A2-2*a*A3+b*A4+A5-a*c

``

Download dcoeffs4.mw

@dharr works at least for your last example

dcoeffs3.mw

@MDD So I had to guess at what you wanted for the part that doesn't contain y(x).

What do you want for a*sin(x)+b*x+c? (a*sin(x)+b*x)*A4+c or a*sin(x)*A4+b*x*A5 +c? Is the function of x always a polynomial?

@MDD Oops, I uploaded the wrong file. dcoeffs2 above should work.

@MDD Sorry, this should work in your version of Maple.

dcoeffs2.mw

@Zeineb 

sol := {solve(HurwitzConditions,useassumptions)}:

restart

interface(version)

`Standard Worksheet Interface, Maple 2022.2, Windows 10, October 23 2022 Build ID 1657361`

expr := x^4-10*x^2+1

x^4-10*x^2+1

plot(expr)

NULL

Download ploterror.mw

@delvin For the 4th time - you need a modulus! I chose l=1, but you might need some other value or maybe just symbolic.  I put sum back to add as I told you originally.

Eq1 is now found without errors. simplification is slow and I didn't wait. Of course in the next step you can't solve one equation for 13 variables. I've fixed the Maple, but it is up to you to take it to the next step.

 Jaco02.mw

@delvin You did not upload your revised version - just insert the link

@delvin JacobiDN (Not Jacoby). You need a modulus.

@delvin As I said before, jacobi has to be changed to Jacobi, and these functions need a modulus as second argument (I don't know what that would be for your application.)

I haven't given much thought to your main question. But you spend a lot of calculation time figuring out the arcs of circles, especially start and end angles. If you just plot full circles and hide the bits outside the unit circle, then this can be done faster. (Though if you want to ultimately color in the regions, I'm not certain this is a good approach.)

PoincareIdeas.mw

@MaPal93 I gave some more thought to the structure of the betas in terms of the lambdas, and found some interesting things. In the expression for lambda__1:

there are no lambda__1's except in the determinant of Q. So if one could prove the numerator was always positive (the demoninator is positive), then the system seems internally consistent - any positive lambda__2 and lambda__3 would make the expression positive and then lambda__1 would be positive. Yet no positive solution can be found for all three equations.

For the calibration system, the signs of betas are as required, and the numerator is positive for positive lambdas.

Thanks for the best answer.

MatrixNew9.mw

@MaPal93 The explanation was added to the MatrixNew8.mw file.

As for the signs of the beta's, since they contain lambda's it might be possible to use the known signs to narrow down the possibilties for the lamba's, but my first look at that didn't yield anything obvious. In general it is harder to decide the conditions for something to be positive or negative than zero.

First 44 45 46 47 48 49 50 Last Page 46 of 95