## Homotopy perturbation method ...

Hi good afternoon , im looking for maple code of HPM to solve time dependent diffusion reaction , can anybody help me . I didnt get how to solve it by maple .

## How to recover only the contents of m-files? ...

Hello

I know that anames( 'user' ) recovers the contents of the workspace but I wonder whether it would be possible to recover only the contents of each m-file read within a worksheet.

Many thanks

Ed

## how to convert a function and differential system ...

how to convert a function to transition matrix?

how to convert a differential system to transition matrix?

## Wheel scroll does not work over a code edit region...

Normally the wheel mouse will scroll a file like it does in just about every other program... but when the mouse is over a code edit region it does nothing ;/ As one is scrolling with the wheel and a code edit region pops up this breaks the flow and requires hoops, I don't like hoops!

Seems most mouse funcitons do not work well in the region. Just trying to select and drag doesn't scroll the region.

## maple function definition...

In addition to defining a function in a standard way, a fast and convenient way to turn a formula (an expression) into a function is to use unapply command (check Maple help center for this command). The following items are about defining functions.

1. Define a function midpoint, which returns the average of two arguments given on input. For example, midpoint(2,3) returns 2.5, midpoint(a,b) returns 𝑎+𝑏2.
2. b) For two positive natural numbers 𝑎 and 𝑏 we can define the least common multiple lcm(𝑎,𝑏) via their greatest common divisor gcd (𝑎,𝑏), i.e.: lcm(𝑎,𝑏) = 𝑎𝑏gcd (𝑎,𝑏). When 𝑎 and/or 𝑏 are zero, lcm(𝑎; 𝑏)=0. Use the arrow operator and piecewise to define the function my_lcm which returns the least common multiple of two natural numbers.
3. c) The quadratic formula allows to write the roots of 𝑝 = 𝑎𝑥2+𝑏𝑥+𝑐 explicitly in terms of 𝑎,𝑏, and 𝑐.

## Piecewise question maple...

Define a piecewise function of 𝑥 so that the value of the function is 0, if 𝑥<−(𝑟1+ 𝑟2+𝑟3) or 𝑥>𝑟1+ 𝑟2+𝑟3, and it is equal to the area of confined region if −(𝑟1+ 𝑟2+𝑟3)<𝑥<𝑟1+ 𝑟2+𝑟3.

## gramp maple quetsions...

a) Given real values 𝑟1,𝑟2,𝑟3>0, consider the curve of the positive part of the circle with radius 𝑟1+ 𝑟2+𝑟3 and center at the origin and three semi-circles below with radii 𝑟1,𝑟2,𝑟3 so that they are arranged from left to right like the following graph. Define proper functions and plot this graph in Maple for 𝑟1=10,𝑟2=2,𝑟3=8.

## PowerSet and RandSet Commands for Sets...

Hey everyone,

Question:

Note that if i is an integer then convert(i,base, 2) will convert i to a binary list (the binary representation of i in reverse order). Then you may use list_to_set to convert  this list to a set. Note that if i runs from 0 to 2^n-1 then list_to_set(convert(i,base,2) )  will run through all subsets of {1, 2, . . ., n}.

(a) Use this idea to make your own procedure PowerSet which will given n,  produce the powerset of {1, 2, . . . , n}. Show by several examples that your procedure works. For your examples you should get nops(PowerSet(n)) = 2^(n). Check that this is the case.

(b) Use this idea to make a procedure RandSet which given n produces a random subset of {1, 2, . . . , n}. [Use rand to produce a random integer in the range 0..2^n-1 and then convert it to a subset of {1, 2, . . . , n}.]  Do NOT use PowerSet or powerset. Show by examples that it works for small n such as 5, 10, and 20 as well as for large n such as 100. It will even work for n = 1000, but the output will be rather large. On average a random subset of {1,2,...,n} will contain n/2 elements.

## Procedures for One-to-One Correspondence...

Hi all,

First-time poster here. Got a question for Symbolic Computations and don't know how to do it. Please help me out.

Here is the question:

There is a one-to-one correspondence between subsets of {1, 2, . . . , n} and binary lists of length n, that is, lists L = [x1, x2 , . . . , xn] where x1, x2, . . . , xn are elements of the set {0,1}.  The correspondence is given by associating to the set S the list L where xi = 1 if i is in S and 0 if not. For example, the set {1,3,5} corresponds to the list [1,0,1,0,1,0,0] if n = 7.

(a) Write a procedure list_to_set whose input is a binary list and whose output is the corresponding set. E. g., list_to_set([1,0,1,0,1]) will return the set {1,3,5}. Note that nops(L) is the length of a list.

(b) Write a procedure set_to_list whose input is a pair S,n where S is a subset of {1, 2, . . . , n} and n is a positive integer and whose output is the binary list of length n corresponding to the set S. E. g., if n = 5 then set_to_list({1,3,5},5) will return [1,0,1,0,1].

(c) Show by a few tests that each procedure works. Then apply set_to_list to each set in the powerset of {1, 2, 3, 4} to form all binary lists of length 4. Make a program to print out a table of the following form. (But the order need not be the same as that started below.)

[0,0,0,0] <-->  {  }
[1,0,0 0] <--> { 1 }
[0,1,0,0] <--> { 2 }
........
etc

Some extra commas in the output is okay. You may obtain the power set of the set {1,2,...,n} by the command powerset(n); but you must first load the package combinat.

Please let me know if there are any questions. Thank you in advance.

## How to perform Max Plus Algebra in Maple...

I want to do min max algebra in maple but dont know how to start. What package is required . Can anyone help me.

## modp has bugs and it's disgusting...

All of his should work very readily

 >
 >
 >
 >
 >
 >
 >

## Non-Linear overdetermined equations - which is bes...

Non-Linear overdetermined equations - which is best method? with less number of iterations

When I use Jacobi it takes 25 iterations.

Any other method which takes less iterations?

## Saveplot function not refresh in for loop call...

I search saveplot and sleep function here

i had kept close filename function and move plot setup default to first line

but thread no sleep in maple 12

then I remove sleep and can save image file

but after I call it in a function and run a for loop for this function

the file is not updated after sleep 3 seconds

how to run a for loop call it and it can refresh

## How to print a specific (large) coefficient of a q...

`s:=series(subs(q=q^6, eta^4), q, N);`
where `eta := series(q^(1/24)*product(1 - q^n, n = 1 .. 100), q, N)`. I know the command `coeftayl(s, q=0, N)` but for certain 𝑞-series it doesn't recognize the numerical value of this coefficient when 𝑁 is too large (even after subtracting the principal part of 𝑠, if there is any) - instead it realizes the coefficient as a HUGE limit of something. Cheers.