MaplePrimes Questions and Posts

These are Posts and Questions associated with the product, MaplePrimes

The code I write is properly indented.  The operation of pasting it here strips the white space and makes it hard for the reader to comprehend the structure. Manually restoring the appropriate indentation is doable but tedious, made more so because the characters we see here are in a variable width font.  The rationale might be that, given a variable width font the indentation is going to be inconsistent, but that isn't the case if the preformatted style is used, which I do, for code.

Is there any way to turn off the white space stripping?  Presumably this is some ridiculous xml-based processing feature.

 

There have come unwanted lines and marks . I donot know how to remove them. Using doc.block, remove block seems to be little tough to incorporate! Please enlighten me. Modified doc. is most welcome. Thanks. Ramakrishnan V 

Gaussian Elimination Method

 

 

Given*the*equations

  restartreset:

with(Student[LinearAlgebra])``

(1)
Coefficient Tanle

Equation 1

Equation 2

Equation 3

Equations

`m__1,1` := 3:
`` 

`m__2,1` := 2:
``

`m__3,1` := 1:
``

`m__1,1`*x__1+`m__1,2`*y+`m__1,3`*z = `m__1,4`; = 3*x__1+y-z = 3

`m__2,1`*x__1+`m__2,2`*y+`m__2,3`*z = `m__2,4`; = 2*x__1-8*y+z = -5

```m__3,1`*x__1+`m__3,2`*y+`m__3,3`*z = `m__3,4`; = x__1-2*y+9*z = 8

The equations in matrix form is given by

Matrix([[3, 1, -1, 3], [2, -8, 1, -5], [1, -2, 9, 8]])

(2)

The Gaussian Elimination gives the simplified natrix equation as given below:

Matrix([[3, 1, -1, 3], [0, -26/3, 5/3, -7], [0, 0, 231/26, 231/26]])

(3)

``The equations in simplified form are:

3*x+y-z = 3

(4)

-(26/3)*y+(5/3)*z = -7

(5)

(231/26)*z = 231/26

(6)

``

The aolution ia obtained by solving the above equations in reverse order

{x = 1, y = 1, z = 1}

(7)

 

``

 

Download GausianFinal15Nov2015.mwGausianFinal15Nov2015.mw

Why have there been so many old Posts and Questions moving to the top of the Active Conversations stack the past two days, even though they have no new activity? This makes MaplePrimes very difficult to use! Please make it so that the Active Conversations stack is sorted by the actual time of the most-recent addition to the thread.

Hi, as I can't manage to copy and paste on mapleprimes, I would be glad to get a hint ...

I currently have a function quadsum(n) that determines the [x,y] solutions of the above equation for an integer n. :

quadsum:= proc(n::nonnegint)
local
k:= 0, mylist:= table(),
x:= isqrt(iquo(n,2)), y:= x, x2:= x^2, y2:= y^2;
if 2*x2 <> n then x:= x+1; x2:= x2+2*x-1; y:= x; y2:= x2; end if;
while x2 <= n do
y:= isqrt(n-x2); y2:= y^2;
if x2+y2 = n then k:= k+1; mylist[k]:= [x,y] end if;
x:= x+1; x2:= x2+2*x-1;
end do;
convert(mylist, list)
end proc:

How would I alter this so that I get [x,y] for n= (5^a).(13^b).(17^c)(29^d) for non-negative integers a,b,c,d?

where A^T is the transpose of A and it's given that (A^T).A is not invertible.

I am stuck as to how to arrive at the solution for x in this case. I initially thought I could multiply both sides by the inverse of A^T reducing it to Ax=b but that was obviously wrong since A^T is itself not invertible(it is singular).

Hi all,

I google and found a program using C# connect with Maple. The Maple file is mla file - a pakage library type of Maple. I want to review data structure and all interfaces funtions to understand the way to implement this features.

Please help me the way to read the original Maple code. I uploaded the .mla file into mediafire if you want to review it. Link http://www.mediafire.com/download/abd9kpk3q6oq8lb/CHEMISTRY.mla 

Regards,

Quan Nguyen

>restart:
>with(LinearAlgebra):
>with(Student[NumericalAnalysis]):
s := {E[1], E[2], E[3]};
v := {x[1], x[2], x[3]};
A := GenerateMatrix(s, v);
B := augment(A)
Then what i do that for any matric i can use same program.

It appears that email notifications have gone on Christmas vacation.
When will they be back?

Description of program: To try to find 'similar shaped' words.  eg the word 'qwirky' is similar to 'ywivhg' because q, y and g have downstrokes and h, k have an 'upstroke'.  ..at present the 'words' are not words in the dictionary sense.

   I have posed several questions throughout the program, but will focus on the most puzzling which is in the last section of the program, reproduced below.  The variable ii is set at 1 - relating to the first letter, q, of the 'word' qwirky. It correctly outputs the list, listy[4], which contains the letter q.  Similarly if ii is set to 2 it ouputs listy[8] - w.  However when ii is set to 3, it ouputs the number 7, when listy[7] (=[i]) was expected.  Values of ii from 4 to 6 (thelength of 'qwirky') work as expected.  Ideally I would like to dispense with  the ii:=1 statement, and uncomment the for .. do loop:

> for ii from 1 to nops(letters) do
> seq(listy[listsuffix[  Ord(letters[ii] )-96] ][kk], kk=1..nops(listy[listsuffix[Ord(letters[ii] )-96] ]) );
> end do:

  Another question was how to incorporate the sequence, seq() statement in a printf statement - but that's enough for now!!:-)

    After reading thris through and seeing theTags, I see I have used a variable 'letters' in my program - perhaps this is causing problems?  I initially thought Maple had a bug in it - but probably a common thought by students!:-)

 ##End part of program  

> ii:=1:   #####Try putting equal to 2, 3, 4, 5, 6
> #ii:=2 returns w - which is correct, but ii:=3 returns 7 when i is expected. Values 4 to 6 work OK
> printf("List of the listy which contains the particular letter, %d  of 'qwirky'  ie the letter %s",ii, letters[ii]);
> printlevel:=5:
> printf("Nops(word)=%d  nops(letters)=%d\n",nops(word),nops(letters));
> #for ii from 1 to nops(letters) do
> seq(listy[listsuffix[  Ord(letters[ii] )-96] ][kk], kk=1..nops(listy[listsuffix[Ord(letters[ii] )-96] ]) );
> #end do:

Thanks, David S

START of MAPLE PROGRAM here

# Similar Words - idea is to create words which look similar in shape to other words
> restart:
> with(StringTools):
> #abcdefghijklmnopqrstuvwxyz
> #a  c, e, o, s, u, x, z
> #b  d, h, k,
> #f  l, t
> #g  j, p, q, y
> #i
> #m  n
> #r  v
> #w
>
> #  Take a word eg 'qwirky' & make words which appear similar -
>
> word:="qwirky":
> numLetters:=length(word):
> printf("Length of word is %d",length(word));
> printf("Why is the length of x+2*y equal to %d - as opposed to just 5?",length(x+2*y));
> printf("Is it because x and y each take up 3 'storage locations' - and one each for +2* ?");  
>
> # Help says:For other objects, the length of each operand of expr is computed recursively and added to the number of words used to represent expr. In this way, the measure of the size of expr is returned.
> #...but I'm not much wiser!:-(
> #I ended up using 'nops' instead, but not sure which is better.
> listy[1]:=[a,c,e,o,s,u,x,z]:
> #printf("Number of letters in listy[1] seq(%s, kk=1..nops(listy[1]))   is %d\n",seq(listy[1][kk], kk=1..nops(listy[1])));
> printf("The previous printf statement - commented out - does not work.  The one below does\n - but that's because I've put in eight 'per cents'\n - I'd like the program to work this out.\n");    
>
> printf("Number of letters in listy[1] %s,%s,%s,%s,%s,%s,%s,%s is %d\n",seq(listy[1][kk], kk=1..nops(listy[1])  ),nops(listy[1]) );
> listy[2]:=[b, d, h, k]:
> listy[3]:=[f, l, t]:
> listy[4]:=[g, j, p, q, y]:
> listy[5]:=[m, n]:
> listy[6]:=[r, v]:
> listy[7]:=[i]:
> listy[8]:=[w]:
> #Which list number, for each letter of the 26 letters?
> #Nos below correspond to a, b,c... ..z
> listsuffix:=[1,2,1,2,1,3,4,2,7,4,2,3,5,5,1,4,4,6,1,3,1,6,8,1,4,1]:
> #printf("listsuffix[12]=%d",listsuffix[12]);
> #printf("listy[4][2]=%s",listy[4][2]);
> printf("Ascii number of Second letter in list 4 is %d",Ord(listy[4][2]));
> printf("Second letter in list 4 is %s",Char(Ord(listy[4][2])));
> #printf("listsuffix[listy[4][2]]=%d",listsuffix[listy[4][2]]);
> #Split into a list of letters
> letters:=convert(word, list):
> #Consider the letters close to the letters - go through all combinations and check to see if any match words in the dictionary.
> #printf("1");
> #printf("%d",Ord(letters[2]));
> #printf("2");
> #printf("Suffix number is %d",listsuffix[Ord(letters[2])-71]);
> #printf("3");
> for i from 1 to length(word) do
> #See which list letter belongs to
> #printf("Letter number %d, %A belongs to list %d\n",i,letters[i],listsuffix[Ord(letters[i])-96]);
> printf("Ascii number of letter number %d, %s in list %d is %d\n",i,letters[i],listsuffix[Ord(letters[i])-96],Ord(letters[i]));
>
> #printf("Ascii number of letter number %d, %s is %d in list %d which is \n",i,letters[i],Ord(letters[i]),listsuffix[Ord(letters[i])-96]);
> #printf("Below may not work");
> #printf("Ascii number of letter number %d, %s is %d in list %d which is seq(%s, kk=1..nops(listy[listsuffix[Ord(letters[ii] )-96] ]) ))\n",i,letters[i],Ord(letters[i]),listsuffix[Ord(letters[i])-96],seq(listy[listsuffix[  Ord(letters[ii] )-96] ][kk], kk=1..nops(listy[listsuffix[Ord(letters[ii] )-96] ]) ) );
>
> #Check out all letters in list, listy[listsuffix[Ord(letters[i])-96]
>
> #seq(  listy[  listsuffix[  Ord(letters[i] )-96]  ], 1..length(listy[                listsuffix[  Ord(letters[i] )-96]);
> #seq(listy[listsuffix[  Ord(letters[ii] )-96] ][kk], kk=1..nops(listy[listsuffix[Ord(letters[ii] )-96] ]) )
> end do:
> #seq(listy[2][kk], kk=1..4);
> #List of listy[2]
> printf("List of listy[2] below:");
> seq(listy[2][kk], kk=1..nops(listy[2]));
> #List of the listy which contains the particular letter of 'qwirky'
> ii:=1:   #####Try putting equal to 2, 3, 4, 5, 6
> #ii:=2 returns w - which is correct, but ii:=3 returns 7 when i is expected. Values 4 to 6 work OK
> printf("List of the listy which contains the particular letter, %d  of 'qwirky'  ie the letter %s",ii, letters[ii]);
> printlevel:=5:
> printf("Nops(word)=%d  nops(letters)=%d\n",nops(word),nops(letters));
> #for ii from 1 to nops(letters) do
> seq(listy[listsuffix[  Ord(letters[ii] )-96] ][kk], kk=1..nops(listy[listsuffix[Ord(letters[ii] )-96] ]) );
> #end do:

#####  END of program.   Below is output for Maple 7   ##########


Warning, the assigned name Group now has a global binding

Length of word is 6
Why is the length of x+2*y equal to 9 - as opposed to just 5?
Is it because x and y each take up 3 'storage locations' - and one each for +2* ?
The previous printf statement - commented out - does not work.  The one below does
 - but that's because I've put in eight 'per cents'
 - I'd like the program to work this out.
Number of letters in listy[1] a,c,e,o,s,u,x,z is 8
Ascii number of Second letter in list 4 is 106
Second letter in list 4 is j
Ascii number of letter number 1, q in list 4 is 113
Ascii number of letter number 2, w in list 8 is 119
Ascii number of letter number 3, i in list 7 is 105
Ascii number of letter number 4, r in list 6 is 114
Ascii number of letter number 5, k in list 2 is 107
Ascii number of letter number 6, y in list 4 is 121
List of listy[2] below:
                                          b, d, h, k
List of the listy which contains the particular letter, 1  of 'qwirky'  ie the letter q
{--> enter printf, args = "Nops(word)=%d  nops(letters)=%d\n", 1, 6
Nops(word)=1  nops(letters)=6
                                              30
<-- exit printf (now at top level) = }
{--> enter StringTools:-Ord, args = "q"
                                             113
<-- exit StringTools:-Ord (now at top level) = 113}
{--> enter StringTools:-Ord, args = "q"
                                             113
<-- exit StringTools:-Ord (now at top level) = 113}
{--> enter StringTools:-Ord, args = "q"
                                             113
<-- exit StringTools:-Ord (now at top level) = 113}
{--> enter StringTools:-Ord, args = "q"
                                             113
<-- exit StringTools:-Ord (now at top level) = 113}
{--> enter StringTools:-Ord, args = "q"
                                             113
<-- exit StringTools:-Ord (now at top level) = 113}
{--> enter StringTools:-Ord, args = "q"
                                             113
<-- exit StringTools:-Ord (now at top level) = 113}
                                        g, j, p, q, y

 

Need to evaluate above summation in maple. For simplicity infinity can be replaced by some constant say 1000.

The value of parameters used are:

alpha=73.11

beta=76.11

E=4.75

help....

I want to get numerical solution of the Eqs.ode(see the folowlling ode and ibc)in Maple.However,when i run the following procedure,it prompts an error "Error, (in dsolve/numeric/bvp) cannot determine a suitable initial profile, please specify an approximate initial solution". How to solve the issue? Please help me.


restart:
n := 1.4; phi := 1; beta := .6931; psi := 1

> restart;
> n := 1.4; phi := 1; beta := .6931; psi := 1;

> s := proc (x) options operator, arrow; evalf(1+(phi*exp(beta*psi)*h(x))^n) end proc;

> Y := proc (x) options operator, arrow; evalf(f-(1/2-(1/2)/n)*ln(s(x))+2*ln(1-(1-s(x))^(-1+1/n))) end proc;


> ode := diff(h(x), `$`(x, 2))+(diff(Y(x), x))*(diff(h(x), x)+1) = 0;


> ibc := h(0) = 0, ((D(h))(10)+1)*s(10)^(-(1-1/n)*(1/2))*(1-(1-1/s(10))^(1-1/n))^2 = 0;

> p := dsolve({ibc, ode}, numeric);
Error, (in dsolve/numeric/bvp) cannot determine a suitable initial profile, please specify an approximate initial solution
>

Hi All. Hope all is well.

Assume that we have partitioned [0,a], into N equidistant subintervals and in each subinterval we have M sets of polynomials of arbitrary form[say bij(t)](a.e Taylor series, or Bernstein series,…)

for Example with N=4, M=3 and by Taylor series we have:

 

now we want to approximate a function, asy f(t), in this interval with following form:

 

If we have:

(Tau is a constant number)
then: How can  we find L and Z matrices using maple? Is it any way? (or other softwares?)

Regards

 

Mahmood   Dadkhah

Ph.D Candidate

Applied Mathematics Department

 

¿Que tipos de programas ayudan en  el desarrollo de problemas geometricos?

¿como puedo resolver problemas en maple17?  

4 5 6 7 8 9 10 Last Page 6 of 17