## dharr

Dr. David Harrington

## 21 Badges

19 years, 352 days
University of Victoria
Professor or university staff
Victoria, British Columbia, Canada

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

## missing x and difficult integrand....

We are still missing a value for x.

The first integral is problematic, since the integrand

`(-epsilon^2/(4*a^2) - tau*epsilon^3)*(cos(epsilon*x) - 1)/epsilon^2`

goes to infinity as epsilon goes to infinity because of the tau* epsilon^3. Is the first factor perhaps intended to be within an exp?

## OK...

@Carl Love OK, thanks for that.

## row indexing...

If you reorganize the dataframe so the your Data are the row labels (which seems logical to me but may not be what you want), then you can just select the rows and columns by indexing:

`TestData[["LC3", "LC4", "LC5", "LC6", "LC7", "LC8", "LC9"], Load];`

dataframe.mw

## polar...

@C_R I think Maple intends polar to serve that purpose - you can do arithmetic with it, but you need evalc() or simplify() to get back to the Re/Im form.

 >
 >

 >

 >

 >

 >

 >

 >

 >

 >

Download polar.mw

## qualifications?...

@Carl Love Generally true of course, but the statement needs some qualification.

 >

 >

Sample solution

 >

 >

Download solve.mw

## unable to reproduce...

I am unable to reproduce this (Maple 2024, Windows 11). After the reformatting thw worksheet runs correctly.

cost_comparison_-_liquid_(v01MP).mw

## multiply by a matrix...

@dharr Of course you can just write X = A.L, with A = X.L^(-1). Still not sure what the rules are.

## X in terms of L...

 >
 >
 >

 >

X has a pair of eigenvalues = +/-mu; their average is at the origin. To shift the eigenvalues of L so their average is at the origin, we add a matrix S

 >

Now a rotation/contraction in the complex plane by multiplying by the ratio of the eigenvalues b will make bQ and X similar

 >

 >

Now bQ and X are similar. So what Matrix relates them?

 >
 >

So we have  or

 >

So putting it all together we have

 >
 >

 >
 >
 >
 >

Download XintoL4.mw

Earlier less streamlined version:

Download XintoL3.mw

## comments...

@WA573 So L and X are U_n and V_n of Eq 2.1 of the paper? But L is not the identity + another matrix so this can't be right. Your use of "constant" without any context in the original question was misleading, and it is still not clear what the rules for writing "X in terms of L" are. Please specify exactly what you mean. You mention eigenvalues, and if you mean the eigenvalues of X and L it might be possible, by considering these, to write X = A + B.L.B^(-1) or some similar expression, where A and B are matrices. Please check that the red k/2 in my answer above is correct and is not -k/2, which would likely make any transformations simpler.

## progress...

@dharr Here's some progress that may also illustrate the difficulty. Since P factors into a cubic and quartic as does Q, you can find one solution by setting the cubic and quartic coefficients equal and solving, as I did here. But I could have set one cubic equal to half the other, and then doubled the correspomding quartic to get another solution. And if the quartic factors into a cubic and a linear factor (which it always does, though not always easily), then there is a choice of cubics to match up, giving some more freedom. I think you need to reformulate the problem to fix two variables (or change variables to a form with two less) in order to give Maple a problem without this freedom.

solve_test.mw

Here's an example where I set a[3]=b[3]=1 and now Maple easily finds a unique (?) solution

solve_testa3b3equal1.mw

Notice that the denominator is just the coefficient of y^3 in P, so if you had also chosen P normalized to have the coefficient of y^3 = 1, then the solution would be simpler.

## much harder...

@Steven_Huang With a symbolic parameter that is much harder. One strategy would be to rewrite your equations in terms of fewer variables, since some seem to be redundant. In your earlier problem, were your expecting it to return the coefficients you set in A1 and B1? That didn't happen, two parameters were arbitrary (Maple chose a[0] and a[3]) - is that what you expected?

## errorplots...

@Khair Muhammad Saraz It's not very clear what you want. Here I generate the error plots as separate plots because they will be on a different scale; I haven't optimized the look of the plots.

DQMSixth.mw

## simpler...

@Carl Love Thanks. Yes, I usually forget 'nolist' as well. Since we only ever want one class representative, the code in ListTools:-Classify can be simplified to

```classreps := proc(f, L);
local class, e;
for e in L do class[f(e)] := e end do;
[entries(class, 'nolist')];
end proc
```

with your proc

```f := g -> [seq](op(4, GraphTheory:-CanonicalGraph(g)))
```

Probably also one would want to change it is to always give generic vertices 1..n, though that could be delegated to the user for the input list.

## can be fixed...

@Carl Love I misinterpreted that statement as meaning you could have two different canonical orders even if the graphs were isomorphic. But I see your interpretation is correct. But the description is also correct; op(4,G) are the same for those graphs; the same problem also exists with @lcz's original list. The error has to do with a misplaced op(1,..) and perhaps 'nolist' for entries (always a problem!). One solution is

```op~(1,{entries}(ListTools:-Classify(
g-> [seq](op(4, GraphTheory:-CanonicalGraph(g))),graph_list),'nolist'));

```

## Classify...

@Carl Love Yes, I use it when I can find such a procedure. In this case, it needs some work; the example is from the CanonicalGraph help page.

Download classify.mw

 2 3 4 5 6 7 8 Last Page 4 of 65
﻿