dharr

Dr. David Harrington

8482 Reputation

22 Badges

21 years, 33 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 answers submitted by dharr

Assuming that your x should be t, then

restart;

EQ:=(3*t)*diff(y(t),t,t)+y(t)=0;
gfun:-diffeqtorec(EQ, y(t), c(n));

{c(n)+(3*n^2+3*n)*c(n+1), c(0) = 0, c(1) = _t[2]}

 


 

Download powerseries.mw

 

There is a problem having the page breaks in the file "The Lattice Package Users Guide.mw" - if you remove them then you can load it into a workbook.

I figured this out by assembling the workbook by hand, and it might be instructive to do this. I would install a package from the cloud ("Orbitals" would be my choice but I'm biased) and look at the workbook structure to figure things out.

To make it a package in the cloud just save the workbook to the cloud from the file menu. Then you can install it from the cloud.

The help page ?worksheet,cloud,creatingPackages is quite good on the details of the process

ode:=diff(y(x),x$2)+lambda*y(x)=0;
bc:=y(0)=0;
sol:=rhs(dsolve({ode,bc},y(x)));
solve(eval(sol,x=L),lambda,allsolutions);

gives  Pi^2*_Z1~^2/L^2 and then about(_Z1) tells you it is an integer.

(Edit: Didn't see Carl's solution until after I submitted this.)

There are n*(n-1) = 64 {0,1} adjacency matrices with zeroes on the main diagonal (loopless graphs), so for this case, an indexing function for generating the matrices can help:
 

restart;with(GraphTheory):with(ListTools):

perm:='perm':
n:=3;
bits:=n*(n-1);
indexfn:=proc(i,j) local m;
         m:=(i-1)*n+(j-1);
         if i=j then 0 else perm[m-iquo(m,n+1)] end if;
         end proc:
Matrix(n,n,indexfn);
mlist:=table():
for i from 0 to 2^bits-1 do
   perm:=Bits:-Split(i,'bits'=bits);
   mlist[i]:=Matrix(n,n,indexfn);
end do:
mlist:=convert(mlist,list):

 

n := 3

 

bits := 6

 

Matrix([[0, perm[1], perm[2]], [perm[3], 0, perm[4]], [perm[5], perm[6], 0]])

(1)

cats:=[ListTools:-Categorize((i,j)->IsIsomorphic(Digraph(i),Digraph(j)),mlist)];

cats := [[Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0})], [Matrix(3, 3, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 1, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 1, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 1, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 1, (3, 2) = 0, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = 1, (3, 3) = 0})], [Matrix(3, 3, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 1, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 1, (2, 2) = 0, (2, 3) = 1, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 1, (3, 2) = 1, (3, 3) = 0})], [Matrix(3, 3, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 0, (2, 1) = 1, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 1, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 1, (3, 2) = 0, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 1, (3, 1) = 0, (3, 2) = 1, (3, 3) = 0})], [Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 1, (2, 1) = 1, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 1, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 1, (3, 2) = 0, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 1, (3, 1) = 1, (3, 2) = 0, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 1, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = 1, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 1, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = 1, (3, 3) = 0})], [Matrix(3, 3, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 1, (2, 1) = 1, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 0, (2, 1) = 1, (2, 2) = 0, (2, 3) = 1, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 1, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 1, (3, 2) = 0, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 1, (2, 2) = 0, (2, 3) = 1, (3, 1) = 0, (3, 2) = 1, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 1, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 1, (3, 2) = 1, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 1, (3, 1) = 1, (3, 2) = 1, (3, 3) = 0})], [Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 1, (2, 1) = 0, (2, 2) = 0, (2, 3) = 1, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 1, (2, 2) = 0, (2, 3) = 0, (3, 1) = 1, (3, 2) = 0, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = 1, (3, 3) = 0})], [Matrix(3, 3, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 1, (2, 1) = 0, (2, 2) = 0, (2, 3) = 1, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 1, (2, 1) = 1, (2, 2) = 0, (2, 3) = 1, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 1, (2, 2) = 0, (2, 3) = 1, (3, 1) = 1, (3, 2) = 0, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 1, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = 1, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 1, (3, 2) = 1, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 1, (2, 2) = 0, (2, 3) = 0, (3, 1) = 1, (3, 2) = 1, (3, 3) = 0})], [Matrix(3, 3, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 1, (2, 1) = 1, (2, 2) = 0, (2, 3) = 1, (3, 1) = 0, (3, 2) = 0, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 1, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 1, (3, 2) = 1, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (2, 1) = 1, (2, 2) = 0, (2, 3) = 1, (3, 1) = 1, (3, 2) = 1, (3, 3) = 0})], [Matrix(3, 3, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 0, (2, 1) = 1, (2, 2) = 0, (2, 3) = 0, (3, 1) = 1, (3, 2) = 0, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 1, (2, 1) = 1, (2, 2) = 0, (2, 3) = 0, (3, 1) = 1, (3, 2) = 0, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 1, (2, 1) = 0, (2, 2) = 0, (2, 3) = 1, (3, 1) = 1, (3, 2) = 0, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 0, (2, 1) = 1, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = 1, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 1, (3, 1) = 0, (3, 2) = 1, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 1, (2, 1) = 0, (2, 2) = 0, (2, 3) = 1, (3, 1) = 0, (3, 2) = 1, (3, 3) = 0})], [Matrix(3, 3, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 1, (2, 1) = 1, (2, 2) = 0, (2, 3) = 0, (3, 1) = 1, (3, 2) = 0, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 0, (2, 1) = 1, (2, 2) = 0, (2, 3) = 1, (3, 1) = 0, (3, 2) = 1, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 1, (2, 1) = 0, (2, 2) = 0, (2, 3) = 1, (3, 1) = 1, (3, 2) = 1, (3, 3) = 0})], [Matrix(3, 3, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 1, (3, 1) = 1, (3, 2) = 0, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 1, (2, 1) = 1, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = 1, (3, 3) = 0})], [Matrix(3, 3, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 1, (2, 1) = 0, (2, 2) = 0, (2, 3) = 1, (3, 1) = 1, (3, 2) = 0, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 0, (2, 1) = 1, (2, 2) = 0, (2, 3) = 1, (3, 1) = 1, (3, 2) = 0, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 1, (2, 1) = 1, (2, 2) = 0, (2, 3) = 0, (3, 1) = 0, (3, 2) = 1, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 1, (2, 1) = 1, (2, 2) = 0, (2, 3) = 1, (3, 1) = 0, (3, 2) = 1, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 1, (2, 1) = 1, (2, 2) = 0, (2, 3) = 0, (3, 1) = 1, (3, 2) = 1, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 1, (3, 1) = 1, (3, 2) = 1, (3, 3) = 0})], [Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 1, (2, 1) = 1, (2, 2) = 0, (2, 3) = 1, (3, 1) = 1, (3, 2) = 0, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 1, (2, 1) = 0, (2, 2) = 0, (2, 3) = 1, (3, 1) = 0, (3, 2) = 1, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 0, (2, 1) = 1, (2, 2) = 0, (2, 3) = 0, (3, 1) = 1, (3, 2) = 1, (3, 3) = 0})], [Matrix(3, 3, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 1, (2, 1) = 1, (2, 2) = 0, (2, 3) = 1, (3, 1) = 1, (3, 2) = 0, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 1, (2, 1) = 1, (2, 2) = 0, (2, 3) = 1, (3, 1) = 0, (3, 2) = 1, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 1, (2, 1) = 1, (2, 2) = 0, (2, 3) = 0, (3, 1) = 1, (3, 2) = 1, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 1, (2, 1) = 0, (2, 2) = 0, (2, 3) = 1, (3, 1) = 1, (3, 2) = 1, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 0, (2, 1) = 1, (2, 2) = 0, (2, 3) = 1, (3, 1) = 1, (3, 2) = 1, (3, 3) = 0}), Matrix(3, 3, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 1, (2, 1) = 1, (2, 2) = 0, (2, 3) = 1, (3, 1) = 1, (3, 2) = 1, (3, 3) = 0})], [Matrix(3, 3, {(1, 1) = 0, (1, 2) = 1, (1, 3) = 1, (2, 1) = 1, (2, 2) = 0, (2, 3) = 1, (3, 1) = 1, (3, 2) = 1, (3, 3) = 0})]]

(2)

nops(cats);

16

(3)

nops(Flatten(cats));

64

(4)

 

 

Download graphs.mw

If the bugs go away, and you generate a list of the digraphs, then you can categorize into the groups (equivalence classes) that are isomorphic using

[ListTools:-Categorize(IsIsomorphic,graphlist)]

I would do the generation of the matrices and graphs like this (for the 2x2 case)

n:=2;
bits:=n^2;
mlist:=table():
for i from 0 to 2^bits-1 do
   mlist[i]:=Matrix(n,n,Bits:-Split(i,'bits'=bits));
end do:
mlist:=convert(mlist,list);

n := 2

 

bits := 4

 

mlist := [Matrix(2, 2, {(1, 1) = 0, (1, 2) = 0, (2, 1) = 0, (2, 2) = 0}), Matrix(2, 2, {(1, 1) = 1, (1, 2) = 0, (2, 1) = 0, (2, 2) = 0}), Matrix(2, 2, {(1, 1) = 0, (1, 2) = 1, (2, 1) = 0, (2, 2) = 0}), Matrix(2, 2, {(1, 1) = 1, (1, 2) = 1, (2, 1) = 0, (2, 2) = 0}), Matrix(2, 2, {(1, 1) = 0, (1, 2) = 0, (2, 1) = 1, (2, 2) = 0}), Matrix(2, 2, {(1, 1) = 1, (1, 2) = 0, (2, 1) = 1, (2, 2) = 0}), Matrix(2, 2, {(1, 1) = 0, (1, 2) = 1, (2, 1) = 1, (2, 2) = 0}), Matrix(2, 2, {(1, 1) = 1, (1, 2) = 1, (2, 1) = 1, (2, 2) = 0}), Matrix(2, 2, {(1, 1) = 0, (1, 2) = 0, (2, 1) = 0, (2, 2) = 1}), Matrix(2, 2, {(1, 1) = 1, (1, 2) = 0, (2, 1) = 0, (2, 2) = 1}), Matrix(2, 2, {(1, 1) = 0, (1, 2) = 1, (2, 1) = 0, (2, 2) = 1}), Matrix(2, 2, {(1, 1) = 1, (1, 2) = 1, (2, 1) = 0, (2, 2) = 1}), Matrix(2, 2, {(1, 1) = 0, (1, 2) = 0, (2, 1) = 1, (2, 2) = 1}), Matrix(2, 2, {(1, 1) = 1, (1, 2) = 0, (2, 1) = 1, (2, 2) = 1}), Matrix(2, 2, {(1, 1) = 0, (1, 2) = 1, (2, 1) = 1, (2, 2) = 1}), Matrix(2, 2, {(1, 1) = 1, (1, 2) = 1, (2, 1) = 1, (2, 2) = 1})]

(1)

graphs:=map(GraphTheory:-Digraph,mlist):

 


 

Download graphs.mw

You can set up indices with procedures, but you stll need parentheses to show it is a procedure.

q := proc () local inds; if not type(procname, 'indexed') then return 'procname(args)' end if; inds := op(procname); inds end proc;

proc () local inds; if not type(procname, 'indexed') then return 'procname(args)' end if; inds := op(procname); inds end proc

(1)

q(y)

q(y)

(2)

q[4, 5]()

4, 5

(3)

q[4, 5]

q[4, 5]

(4)

``

 

If r=0 then you correctly change i. But then you test r agoinst N+1, which fails, and then the else clause sets i back to r, which is zero.

The Digraph command doesn't seem to allow loops, but adding a weight in a diagonal entry of the Adjacency matrix seems to be accepted, and the weight is given by DrawGraph near the vertex.


 

with(GraphTheory):

A := Matrix([[2,2,0],[0,0,0],[1,3,0]]);

A := Matrix(3, 3, {(1, 1) = 2, (1, 2) = 2, (1, 3) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (3, 1) = 1, (3, 2) = 3, (3, 3) = 0})

(1)

G := Graph(A);

GRAPHLN(directed, weighted, [1, 2, 3], Array(%id = 18446744074240237686), `GRAPHLN/table/20`, Matrix(%id = 18446744074240237566))

(2)

DrawGraph(G);

 

Digraph({[1,1]});

Error, (in GraphTheory:-Graph) invalid edge/arc: [1, 1]

 

 


 

Download Loopgraph.mw

If you add "assuming M>0, g>0;" then you get undefined. If your further choose a limit from the left or right you get -infinity or +infinity.

Maple needs to know the new varables are u and v, not W and Q. Try:

Change(V, {x = u-W, y = v-Q}, [u, v]);

if Row(A,2).Row(A,2)=0 then...

Another 2-D math problem. There needs to be a multiplication between the c^2 and the parenthesis. Then it easily plots, and fsolve gives the two solutions, which are obviously x=+/-R.

y(x)2.mw

The companion matrix can be used - for monic polynomials. The determinant is not unique and may not be the one you want.
 

with(LinearAlgebra):

p:=w^2 + u*w + v; #monic polynomial

u*w+w^2+v

(1)

w*IdentityMatrix(degree(p,w))-CompanionMatrix(p,w);

Matrix([[w, v], [-1, w+u]])

(2)

 


 

Download Companion.mw

There is no exact solution to the accuracy that Maple usually works at. You need to find a close "near enough" solution, which means you can't use fsolve. The easiest way is to minimize a sum of squares as in the worksheet below.
 

eqs := {(2^2/a^2+2^2/c^2-2*(2*2)*cos(x)/(a*c))/sin(x)^2 = 1/2.2393^2, (2^2/a^2+4^2/c^2+4*(2*2)*cos(x)/(a*c))/sin(x)^2 = 1/1.5968^2, (1^2/a^2+sin(x)^2/b^2+2^2/c^2+(2*2)*cos(x)/(a*c))/sin(x)^2 = 1/2.7896^2, 1/sin(x)^2*(2^2*sin(x)^2/b^2) = 1/2.8650^2};

{(4/a^2+4/c^2-8*cos(x)/(a*c))/sin(x)^2 = .1994230893, (4/a^2+16/c^2+16*cos(x)/(a*c))/sin(x)^2 = .3921922000, (1/a^2+sin(x)^2/b^2+4/c^2+4*cos(x)/(a*c))/sin(x)^2 = .1285038476, 4/b^2 = .1218290191}

(1)

Move the sin(x)^2 over to the right hand side

eqs2:=eqs*~sin(x)^2;

{4*sin(x)^2/b^2 = .1218290191*sin(x)^2, 4/a^2+4/c^2-8*cos(x)/(a*c) = .1994230893*sin(x)^2, 4/a^2+16/c^2+16*cos(x)/(a*c) = .3921922000*sin(x)^2, 1/a^2+sin(x)^2/b^2+4/c^2+4*cos(x)/(a*c) = .1285038476*sin(x)^2}

(2)

Sunm of squares of differences to minimize

S:=add((lhs(eq)-rhs(eq))^2,eq in eqs2);

(4*sin(x)^2/b^2-.1218290191*sin(x)^2)^2+(4/a^2+4/c^2-8*cos(x)/(a*c)-.1994230893*sin(x)^2)^2+(4/a^2+16/c^2+16*cos(x)/(a*c)-.3921922000*sin(x)^2)^2+(1/a^2+sin(x)^2/b^2+4/c^2+4*cos(x)/(a*c)-.1285038476*sin(x)^2)^2

(3)

Minimise subject to some constraints

Optimization:-Minimize(S,{a>=0,b>=0,c>=0,x>=0,x<=Pi});

[0.162642134569434096e-11, [a = HFloat(8.902766366460824), b = HFloat(5.7300076115735505), c = HFloat(6.416618564610261), x = HFloat(1.8419029174006967)]]

(4)

Gives a close solution, but not the one you wanted (though b is right). Probably there are several close solutions; it will be hard to decide - perhaps there are several combinations of a and c and x that work

 


 

Download Crystal.mw

First 70 71 72 73 74 75 76 Last Page 72 of 83