MaplePrimes Questions

I have f1=x, and fn=x+sin(fn-1).

I would like to write a procedure that would allow me to find the first derivative of fn. Thanks.

 

the question is as follow:

1)receive two integers p and q

2)declare two local p1 and q1 and give them intial values and q

3)check if p o q are equal or less to zero print works only with positive integers

4)while p1 not equal to q1 then p1-a1 otherwise q1-p1

5)whenever p1=q1 we have the GCD

note:must use procedure and call it for different values of p and q after the procedure is written

-by following the instruction above this is what i got

GCD:=proc(p,q)

local p1,q1;

p1:=p;

q1:=q;

if p<=0 OR Q<=0 then 'works only with positive integers'
else while p1<>q1 do if q1<p1 then p1-q1 else q1-p1

end if;

end do;

end if;

end proc;

but when I call two integers eg:p=2, q=6 -> GCD(2,6) maple just freeze...evaluating....forever. is it because i got the procedure wrong etc? it would be helpful if anyone can help me with this. thanks

 

 

A square has 36 sub-squares in it. How to Number each sub squares from 1 to 36, to make the sum of vertical, the sum of horizontal, and the sum of cross line are the same .Describe in general if possible.

I am using the ColumnSpace command (from the LinearAlgebra package) to generate a basis for the column space of a matrix. Is there any way to "force" the command to express the basis in terms of columns of A and not in the canonical form with leading 1's?

For example, for

A:=Matrix([[-3,6,-1,1-7],[1,-2,2,3,-1],[2,-4,5,8,-4]]):

I would like to obtain the following basis for the column space:

{[-3,1,2],[-1,2,5]}

 

I want to plot my function f(x)=sin(e^x +1) and its third order taylor polynomial on the same graph. My code so far (which is giving me an error when I try to define i) is:

f:=x->sin(exp(x)+1);

with(Student[NumericalAnalysis]):

g:=TaylorPolynomial(f(x),x,order=3);

unapply(g,x);

h:=plot(f,0..3,-2..2,color=blue);

i:=plot(g,0..3,-2..2,color=red);

with(plots):

display({h,i},axes=boxed,title=`The function f and its Third Order Taylor Polynomial`);

 

Thanks.

 

I have a set of around 60 linear equations with symbolic coefficients. ie

 

a*x1 + b*x2 + ... + c*x60 = 1

x1 + (c-a)*x2 + ... + d*x60 = 0

...

c*x1 + d*x2 + ... + b*x60 = a

 

The coefficients a,b,c,d are functions of x1...x60. I am trying to find the values of these coefficients. When I had a smaller set of equations I was solving them symbolically to find x1...x60 in terms of a,b,c,d and then using this solution to solve for a,b,c,d. I can no longer solve the set of equations symbolically as it is too large. How do I find the coefficients? I had some sort of optimization routine in mind.

Bonjour

 

Comment se calcul le résidue d'une fonction f(x,y) ?

Si par exemple f(x,y)=1/x+1/y+5/(x*y), alors le residue de f en (0,0) est défini comme étant (1/2*Pi)^2*int(f(x,y)) avec intégrale est sur une sphère qui contient l'origine.

Est ce qu'il est égal au coefficient 5 de 1/(x*y) dans le developpement de laurent en deux variables ??

 

Merci d'avance,

Gérard.

Solve the following initial value problem for y(t), z(t).

 

dy/dt + dz/dt =t

dy/dt-2 dz/dt=t^2

 

with initial condition y(0)=1, z(0)=2.

 

Thanks.

with(LinearAlgebra):

n := 31;

h := 0;

c1 := Array(1 .. 100);

c2 := Array(1 .. 100);

c3 := Array(1 .. 100);

for tt from 0 to n-4 do

c1[tt+1] := ...

c2[tt+1] := ...

c3[tt+1] := ...

od;

plot3d([c1[x],c2[x],c3[x]], x=1..27, y=1..27);

Here is the question:

Consider f(x)=x3 over [a,b] and a partition P of [a,b] into n equal subintervals. Find the length of this subinterval and assign it to dxj.

a) Assign the rightmost point of the jth subinterval to xj. Set up an expression corresponding to the Riemann sum for this partition with  as the rightmost point xj in each subinterval.

b) Find the limit of this expression as n->∞. Integrate f(x) between a and b and comment on your evaluation of the integral and the value of the limit.

 d) Show that the limit of the Riemann sum remain unchanged if

xj = the left most point in the jth interval

or if

xj = the midpoint in the jth interval

 

anyone know how to go about this question? thanks

I am trying to find what values of x f(x) is increasing without estimating from the graph

 

Hi,
     I'm comparing a numerical (asymptotic series solution) to a analytical one in Maple 14, 16 and17 (I have many different machines). I make a substitution S(r) = r^(l+1) R(r) to remove singularities and ask maple to solve for S(r) numerically. Then simply

R(r) = S(r)/ r^(l+1) where S(r) is a numeric procedure
and
diff(R(r), r) = diff(S(r),r)/ r^(l+1) - (l+1) S(r)/ r^(l+2) by the  chain rule, and diff(S(r),r) is another numeric procedure returned by maples dsolve.


Now |
S(r)_numeric agrees with S(r)_analytic,
R(r)_numeric agrees with R(r)_analytic,
diff(S(r),r)_numeric agrees with diff(S(r),r)_analytic
BUT diff(R(r),r)_numeric DOES NTO AGREE WITH  diff(R(r),r)_analytic
 
To me this seems that the formula from the chain rule most be wrong. Does anyone have any ideas? I've attached a .msw file too

Thanks,
Matt
testingDRoutside.mw

Dear Experts,

 

Analytical integration is not a choice for the integrals listed here. Hence, Maple is not able to find the numerical integration for the following oscillatory functions. However mathematica can. However, before I take the mathematica results, just need to check with you.

Following link shows that for a diverging series, the (Numerical) integral is finite.

http://books.google.com.sg/books?id=vntDnyh0gacC&pg=PA664&lpg=PA664&dq=nintegrate++seqlim&source=bl&ots=iNYR1o6kVd&sig=VuiQuiUMDEEGOBnguSwfcPPSHQA&hl=en&sa=X&ei=k_J4UofXJYjNkwW79IDYBw&ved=0CE4Q6AEwBA#v=onepage&q=nintegrate%20%20seqlim&f=false

 

1)

 Maple: 

eval(int(r^2 BesselJ(1,r)* BesselJ(0,r), r = 0..infinity)) 

Float(undefined)

Mathematica: 

NumberForm[ NIntegrate[BesselJ[0, x]*BesselJ[1, x]*x^2, {x, 0, Infinity},   AccuracyGoal -> 20], 15]

SequenceLimit::seqlim: The general form of the sequence could not be determined, and the result may be incorrect. >>

-95982.37707206068

 

2)  Maple:
       eval(int(r* BesselJ(0,r), r = 10..infinity)) 

                         Float(undefined)

Mathematica: 

NumberForm[ NIntegrate[BesselJ[0, x]*x, {x, 10, Infinity},   AccuracyGoal -> 20], 15]

SequenceLimit::seqlim: The general form of the sequence could not be determined, and the result may be incorrect. >>

-0.434727

 

Any conclusions on the result.

a) Why maple not able to evaluate the integrals.  b) Are the result of the Mathematica can be considered as appropriate.

 

Attached is the maple file for your consideration.

Integrations.mw 

 

Lookinf forward to your reply.

 

Thanks.

Hello!

Im a regular student and Math is a really difficult topic for me, and every once in a while i run into a problen that i am unable to solve. This time i would like to ask this commmunity for some help. Many thanks in advance.

The function itself is: y = sqrt((x^2-5*x+6)/log[10]((x+10)^2))

I was able to determine the domain (X), but i am having very big trouble with finding the range (Y). Also i should be able to do it with pen on paper, but so far i have wasted 2 days and many papers on pointless scribblig.

Could anyone please explain how could i find the range of that function and provide a step by step solution? 

Suppose I broadcast a game show where every episode there is 5 randomly chosen topics from 8 possible topics (A,B,C….). how can I get maple to do this automatically?

 I thought I could use

  > with(combinat):

> choose([A,B,C,D,E,F,G,H], 5);

of course the output comes out ordered. is there some way to randomize it? or another way? rgds

First 1511 1512 1513 1514 1515 1516 1517 Last Page 1513 of 2429