Unanswered Questions

This page lists MaplePrimes questions that have not yet received an answer

Is there something I should be doing whenever I use simplify to avoid things like this, or should I stop using the "is" function all together?

 

interface(showassumed = 0):

 

sum(binomial(k+j, k), j = 0 .. n-k) = binomial(n+1, k+1)

(n-k+1)*binomial(n+1, k)/(k+1) = binomial(n+1, k+1)

(1)

#And we have:
is(sum(binomial(k+j, k), j = 0 .. n-k) = binomial(n+1, k+1))

FAIL

(2)

#And since:
is(simplify(convert(sum(binomial(k+j, k), j = 0 .. n-k) = binomial(n+1, k+1), 'factorial')))

true

(3)

is(sum(binomial(k+j, k), j = 0 .. n-k) = binomial(n+1, k+1)) = is(simplify(convert(sum(binomial(k+j, k), j = 0 .. n-k) = binomial(n+1, k+1), 'factorial')))


 

Download main.mw

Hello people :) 

As the captian says, im trying to remove an old task i've made.
But i get this:

Error in Get, invalid object [_XML_reply_data_get("reference" =
"_Maplets_reference_12","parameter" =
"value",_XML_content("Task,UserTasks,Nyops",&Entity "#xc3",&Enity
"#xa6","tning"))]

And i have no idea what it is, but it won't erase my task :'D

Thanks a bunch in advance! 

Have a great weekend you all
Best regards Lucas :)

Hi 

I was wondering someone could help me with something.

Basically I've got a function of f(x,z) that I have plotted which comes from an integration that was taken over a large number of small steps. I have been able to plot this function to determine a Potential Field as a function of x and z. (No Problems so far)

However the next step that I want to be able to do is compute a field form this potential. apologies for my lack of knowing how to input into here as I am fairly new to this. To do this I have:

Field = - Nabla * Potential 

Again no problem, I can plot a gradient field from it which is great using the gradplot command. I beleive this comes as a result of the following:

gradplot = [diff(f,x), diff(f,z)]

HOWEVER I want to be able to plot a Field Strength plot (In essence a Gradient Field Strength) where it takes the magnitude of the vectors at each point. Firstly am I correct in saying that this should be:

Magnitude Field = |F| = sqrt( Fx^2+Fz^2)      where Fx is diff(f,x) and Fz is diff(f,z)

 

However when I try to compute this, it takes an age to evaluate and doesn't seem to make much progress. I think this may come as a result of computing square roots of large numbers/large decimal places? I was wondering whether there is any command that anyones knows of that would calculate Gradient Field Strength/Magnitude that may solve this issue? Or even who to just compute this Square root?

A few seconds after calling up Help starts zucking araound and the whole computer then freezes. Ctrl-Alt-Delete doesn't work, hard reset required. Very funny. Am I alone?

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 . 

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

 

My maplet

mpt := Maplet(Window("Точка выше или ниже прямой",
[[Plotter[f]()], ["1st vector"],
[TextField[v1](), TextField[v2](), TextField[v5]()],
["2nd vector"],
[TextField[v3](), TextField[v4](), TextField[v6]()], ["Скаляр"],
[TextField[scalar]()], [Button("Add", Evaluate(f = 'work(1)'))],
[[ToggleButton['d2']("2D", 'value' = true, 'group' = 'BG1')],
[ToggleButton['d3']("3D", 'value' = false, 'group' = 'BG1')]]]),
ButtonGroup['BG1']())

 

Now I choose via toogle button what to plot 2D or 3D addition but I need to plot it in two different plotter, is there a way to do it?

 

Procedure 

with(Maplets);
with(Elements);
with(Tools);
[AddAttribute, AddContent, Get, ListBoxSplit, Parse, Print, Set, 

  SetTimeout, StartEngine, StopEngine]
with(plots);
with(LinearAlgebra);
with(Student[LinearAlgebra]);

with(Maplets[Elements]);

work:=proc(g)

     local x1, y1, x2, y2, scalar;z1, z2,d2,d3,u,v,U,V,r1,r2,r3,R1,R2,R3,V1:
 x1 := Get(v1::algebraic);
 y1 := Get(v2::algebraic);  

z1 := Get(v5::algebraic);  

x2 := Get(v3::algebraic);  

y2 := Get(v4::algebraic);  

z2 := Get(v6::algebraic);  

scalar := Get(scalar::algebraic);

 d2:= Get(d2);  

d3:= Get(d3);    

 if d2 = true then  u, v:=<x1, y1>, <x2, y2>;  

elif d3 = true then   u, v:=<x1, y1,z1>, <x2, y2,z2>;  

end if;  U:=arrow(u, color=red):  

V:=arrow(u, v, color=black):    

   r1:=u+v: r2:=u-v: r3:=ScalarMultiply(u,scalar):r4:=ScalarMultiply(v,scalar):  

R1:=arrow(r1, color=red):

 R2:=arrow(v, r2, color=black):  

R3:=arrow(r3, color=black):

 R4:=arrow(r4, color=black):  

V1:=arrow(v, color=blue):    

if g = 1 then return VectorSumPlot(u,v, show=1, caption="Треугольник", vectorcolors=[red,blue]);    

end if;  

end proc:

Repeat once again what do I need: I want to plot addition of vectors in 2D and 3D in 2 different plotters at once

how to convert a function to transition matrix?

how to convert a differential system to transition matrix?

 

Does global optimization toolbox has randomization option it gives same value every time

 

 

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

 

 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. 

 

 

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. 

Hey everyone,

Got another Symbolic question here that I have no idea how to begin. Please help again.

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.

Again, please help me with this and thank you in advance. Your assistance is appreciated.

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.

First 83 84 85 86 87 88 89 Last Page 85 of 334