MaplePrimes Questions

Search Questions:

For example...

Using a $2 calculator I get that rad(2470) it is approximately 49.699094.

I haven't used Maple in several months and was surprised to see that I couldn't easily search the answer to this question. Something like eval() does not work on this.

There is a time difference variation between two clocks (0.124, 0.120) and between the same clocks for the same calculations at different times(0.07, 0.124 and 0.120, 68. What is the reason?

Thanks for answering.

Ramakrishnan V
 

restart; t1 := time[real]()

2344.956

(1)

t1PC := Now(ProcessClock)

_m1718422690432

(2)

"for i = 1 to 1000  i:=i+1  end;"

t2 := time[real]()

2345.080

(3)

t2PC := Now(ProcessClock)

_m1718421822656

(4)

tdiff := t2-t1

.124

(5)

tdiffPC := t2PC-t1PC

120*Units:-Unit(ns)

(6)

I redo the same programm again to see the time of performance

t1 := time[real]()

2345.253

(7)

t1PC := Now(ProcessClock)

_m1718419758016

(8)

"for i = 1 to 1000  i:=i+1  end;"

t2 := time[real]()

2345.323

(9)

t2PC := Now(ProcessClock)

_m1718418631616

(10)

tdiff := t2-t1

0.70e-1

(11)

tdiffPC := t2PC-t1PC

68*Units:-Unit(ns)

(12)

 

Now I again recall the stored time values. (unit: milliseconds). t1 and t2 are retained for ever until unassigned.

t1

2345.253

(13)

``

t2

2345.323

(14)

t2-t1

0.70e-1

(15)

t2PC-t1PC

68*Units:-Unit(ns)

(16)

``


 

Download timeToRunDifference.mw

There  are commands tic and toc in matlab program.

tic

toc

toc - tic 

This gives the run time for the program.

Even in excel, we can find the difference between clock times at the start and end using NOW commands.

Is there a similar way to use maple commands to find the running time of a program.

 I want to find the time taken by the student to solve the quiz questions in the enclosed doc.

Could anyone help please?
 

restart

Chapter 1 -  SubChapter 1 - Precalculus - Quiz 1 (15 questions - Duration - 1 hour)

 

                Factor 3*x^2-10*x-8

(3x + 2)(x - 4)

NULL

NULL

NULL

NULL

NULL

Press your option above for Answer

 

 

``

 

              Solve "x^(2) - 4 x - 5 = 0 by factoring"

``

``

-1, 5

``

``

Press your option above for Answer

 

 

``

 

                Roots of the equation x^2-8*x-20 = 0*are

 

``

- 2, 10

``

``

``

``

Press your option above for Answer

 

 

``

 

Correct Answer

``

``

``

``

``

Press your option above for Answer

 

 

NULL

 

NULL

NULL

Correct Answer

NULL

NULL

Press your option above for Answer

 

 

NULL

 

NULL

Correct Answer

NULL

NULL

NULL

NULL

Press your option above for Answer

 

 

``

 

Correct Answer

``

``

``

``

``

Press your option above for Answer

 

 

NULL

 

NULL

NULL

Correct Answer

NULL

NULL

Press your option above for Answer

 

 

NULL

 

NULL

Correct Answer

NULL

NULL

NULL

NULL

Press your option above for Answer

 

 

``

 

Correct Answer

``

``

``

``

``

Press your option above for Answer

 

 

NULL

 

NULL

NULL

Correct Answer

NULL

NULL

Press your option above for Answer

 

 

NULL

 

NULL

Correct Answer

NULL

NULL

NULL

NULL

Press your option above for Answer

 

 

``

 

Correct Answer

``

``

``

``

``

Press your option above for Answer

 

 

NULL

 

NULL

NULL

Correct Answer

NULL

NULL

Press your option above for Answer

 

 

NULL

 

NULL

NULL

NULL

Correct Answer

NULL

Press your option above for Answer

 

 

QuizNULL

Go to Chapter1 - SubChapter 2

Home

 

NULL


 

Download Commands_for_Time_Taken_to_Answer_Please.mw

Thanks.

So I'm running into the problem that when I use an assumption, to say automate dsolving, the solution functions I end up defining, has the 'tilde' variable in it. which doesn't seem to be redefinable. How do I get rid of the assumption, in a defined function, or alternatively, how to do I redefine the variable so the function will use it?

Dear friends, I have made a doc using embedded components to plot a curve. What commands should I do to animate (and pause and play using a custom play/pause button inserted in the table) the plot. Normally I have to use explore animate command, but it requires the user to use animation tools. There must be a way to do the same using play = true; loop = true commands. I donot know its use. Can any one help. Thanks. 

 

use DocumentTools in

Do(q = %MathContainer0);
Do(p = eval(q));
# Do(%Plot0 = plot(p, x = 0..2*Pi));
Do(%Plot0 = plot(p, x = 0..10));
end use;


 

 

 Write the expression in textarea and click the button to see the plot in plot area and expression in math container

      NULL

 

 

``

NULL


Thanks for helping out. Ramakrishnan V

Download animation_CommandPlease.mw

I am trying to find local extrema for multi variable functions. Using Hessian matrix and eigen values I am able to find the global extrema. Also by using boundary conditions I am able to solve for critical points with in given domain.

But, when there is no maxima or minima inside a local domain, It is believed to be minima/maxima lies on one of the boundaries(that point cannot be a critical point). I want to add this boundary points to the list of critical points

Example:

Term := x^3+x^2*y-2*y^3+6*y;
critical points := [[x = .6928203232, y = -1.039230485], [x = -.6928203232, y = 1.039230485], [x = 0., y = -1.], [x = 0., y = 1.]]
boundaries := [[-1<=x],[ x<=1], [-1<=y], [y<=1]];

now I want to read the boundaries as input and get the output as
boundaries :=[[x = -1,y =0],[x = 1,y =0],[x = 0,y =-1],[x = 0,y =1]];

When I did this manually I observed boundary points are saddle, since eigen values are mixed positive and negitive. But, my interest is to find the function value at boundaries.

Note: I believing value of other variables at perticular boundary is zero. In general I have to deal with multivariable functions with more than 3 variable.


Thank you



 

Hi,

Is it possible to find where a parametric intersects with itself?

For example, lets have the parametric:

[sin(6t),cos(2t)] 

For what value values of t will it yield the same (x,y) cordinate. 

Suppose we have functions dependent on certain variables.  I don't want the dependencies explicitly shown in the output.  How do I hide them?

For example

f(x)+f(x)^2-(diff(y(t), t)) = diff(y(t), t, t)
                         

I would like just f not f(x) and similarily just y instead of y(t) shown.

The third execution of procedure TP returns infinity but it has a real value in the integral's plot. Why is this?

Int_Question.mw


I have an object in 6d I'd like to visualise. The region of 6d space I am interested in is described by these equations:

{f[10] = -(.2000000000*(5.*f[21]*f[20]*f[22]-5.*f[20]*f[22]^2+20.*f[20]*f[21]-20.*f[20]*f[22]+135.*f[20]+46.*f[21]))/(f[21]*(f[21]-1.*f[22])),
f[11] = -1.*f[22]-4.,
f[12] = -(1.*(f[22]^2+4.*f[22]-27.))/f[21],
f[20] = f[20],
f[21] = f[21],
f[22] = f[22]}

clearly the first three variables are dependant, and the latter three are independant. I'd like to graph the first three as the latter three vary between bounds and then colour the points on the output based on where they came from in the input, so i can get some intuition about what these equations mean.
 

Hi,

I am interested in problems where ODEs are assocaitied with outputs (functions of the variables), for example

dx[1]/dt = a*x[1]+b*x[2]+c
dx[2]/dt = d*x[1]+e*x[2]+f

y=x[1]+x[2]

particularly rthe problem of what choices of innitial conditions/parameters lead to the same output (i.e. function y(t) ).

Currently  Iam awaiting my examiners resonse to my PhD so i thought it would be nice to try and build up my intuition with a toy system (the linear one above). Unsuprisingly by switching the parameters from one equation to the other you can get a symetrical solution that is assocaited with the output (as shown on this graph, for a specific parameter vector)


however it appears that a lot of other parameter vectors/solutions will give the same output (these are listed on line 1.2.5 of the worksheet)- in particular there are 4 sets of parameter vectors there that will give the same output. However none of these sets have finitely many elements (they can be thought of spaces within parameter space).

What I am wondering is, is there a way of visualising the solutions associated with them (like in the above graph)? possibly by odeplotting within nested loops? 

(my intuition is that that would look really cool)

Consider f is a polynomial which is constructed from some polynomials. In other words, f=g_1^{k_1}*g_2^{k_2}*...*g_n^{k_n} where  g_1,g_2,..,g_n are some polynomials and also  k_1,k_2,..,k_n are positive integer numbers.

My question: How to define a procedure such that the output of proc(f) is the following list [g_1 , g_2 , ... g_n]. In fact, the procedure separates the factors of the polynomial f into  a list and also removes the powers of the factors. 

For example, suppose that f=x*(x+1)^4*(x^2+x+1)*(x^3+x^2+1)^5. Then, the output of the proc(f) be as follows [x , x+1 , x^2+x+1 , x^3+x^2+1].

Thanks in advance

I wonder if it is possible to automatically obtain the well-known  binomial theorem  for an arbitrary integer and a positive exponent  n  in Maple. The expansion  (1)  below  I want to get in Maple automatically. But all my attempts were unsuccessful:
 

restart;

(a+b)^n=Sum(binomial(n,k)*a^(n-k)*b^k, k=0..n);  # The binomial theorem

(a+b)^n = Sum(binomial(n, k)*a^(n-k)*b^k, k = 0 .. n)

(1)

expand((a+b)^n) assuming n::posint;
convert((a+b)^n, Sum) assuming n::posint;
convert((a+b)^n, polynom) assuming n::posint;
convert((a+b)^n, binomial) assuming n::posint;

 

(a+b)^n

 

(a+b)^n

 

(a+b)^n

 

(a+b)^n

(2)

 


 

Download binomial_theorem.mw

I am trying to price an option with the explicit fnite difference method. The code works up until   but does not run after that. Any help would be greatly appreicated 


I tried to solve this double integral in Maple but didn't get the solution so how can I solve this?

Please help

restart

a := .5

.5

(1)

b := .6

.6

(2)

R := 0.1e-1

0.1e-1

(3)

E := 210000000000/(1-.3^2)

0.2307692308e12

(4)

h := a/(2*sqrt(-2*y^2+1))

.2500000000/(-2*y^2+1)^(1/2)

(5)

F1 := sqrt(tan((1/2)*Pi*h)/((1/2)*Pi*h))*[.752+2.02*h+.37*(1-sin((1/2)*Pi*h))^3]/cos((1/2)*Pi*h)

2.828427125*(tan(.1250000000*Pi/(-2*y^2+1)^(1/2))*(-2*y^2+1)^(1/2)/Pi)^(1/2)*[.752+.5050000000/(-2*y^2+1)^(1/2)+.37*(1-sin(.1250000000*Pi/(-2*y^2+1)^(1/2)))^3]/cos(.1250000000*Pi/(-2*y^2+1)^(1/2))

(6)

F4 := sqrt(tan((1/2)*Pi*h)/((1/2)*Pi*h))

2.828427125*(tan(.1250000000*Pi/(-2*y^2+1)^(1/2))*(-2*y^2+1)^(1/2)/Pi)^(1/2)

(7)

C1 := (1/2)*u*(F1^2+1.3*F4^2)/(Pi*E*R)

0.2166666666e-9*u*(8.000000001*tan(.1250000000*Pi/(-2*y^2+1)^(1/2))*(-2*y^2+1)^(1/2)*[.752+.5050000000/(-2*y^2+1)^(1/2)+.37*(1-sin(.1250000000*Pi/(-2*y^2+1)^(1/2)))^3]^2/(Pi*cos(.1250000000*Pi/(-2*y^2+1)^(1/2))^2)+10.40000000*tan(.1250000000*Pi/(-2*y^2+1)^(1/2))*(-2*y^2+1)^(1/2)/Pi)/Pi

(8)

B := int(int(C1, u = 0 .. a), y = -b .. b)

int(0.2195292312e-10*tan(.3926990817/(-2.*y^2+1.)^(1/2))*(-2.*y^2+1.)^(1/2)*[.7520000000+.5050000000/(-2.*y^2+1.)^(1/2)+.3700000000*(1.-1.*sin(.3926990817/(-2.*y^2+1.)^(1/2)))^3]^2/cos(.3926990817/(-2.*y^2+1.)^(1/2))^2+0.2853880005e-10*tan(.3926990817/(-2.*y^2+1.)^(1/2))*(-2.*y^2+1.)^(1/2), y = -.6 .. .6)

(9)

evalf(B)

int(0.2195292312e-10*tan(.3926990817/(-2.*y^2+1.)^(1/2))*(-2.*y^2+1.)^(1/2)*[.7520000000+.5050000000/(-2.*y^2+1.)^(1/2)+.3700000000*(1.-1.*sin(.3926990817/(-2.*y^2+1.)^(1/2)))^3]^2/cos(.3926990817/(-2.*y^2+1.)^(1/2))^2+0.2853880005e-10*tan(.3926990817/(-2.*y^2+1.)^(1/2))*(-2.*y^2+1.)^(1/2), y = -.6 .. .6)

(10)

 

(11)

``


 

Download mapleprime.mw

1 2 3 4 5 6 7 Last Page 1 of 1700