Ramakrishnan

Ramakrishnan Vaidyanathan

289 Reputation

6 Badges

5 years, 140 days

Social Networks and Content at Maplesoft.com

With twenty years of Industrial experience and twenty years of teaching experience, I am now as retired Professor, using Maple to teach mathematics subject for students studying X to XII standards.

MaplePrimes Activity


These are replies submitted by Ramakrishnan

@tomleslie

Format , Style, Style Management  and now if I select heading the paragraph style comes and I can do apace adjustments.

If i select any item under P, then paragraph style comes.

If I select any item under C, then character style come in which line specing etc do not come.

 I have now understood the arrangement and it is useful for me to learn now.

Cheers. Thanks. Ramki

@hhdizband 

I think it should be differentiate with respect to x and not y'.

If it is wrt y', then it is a very simple problem by putting x = y'. The problem becomes d [√(1+x^2)] / dx. Maple easily solves it.

For d() /dx, answer already sent by maple prime member Mr.Acer. It solves our problem. 

Cheers.

Ramakrishnan V

 

@JSalisbury

Dear friend,

I tried the code you have sent. It did not work at first. In line 4,  lrange := 6 Pi, a semicolon I added. Then it worked, but the result showed as follows.

          [Length of output exceeds limit of 1000000]
          [Length of output exceeds limit of 1000000]

Can you send your document/worksheet enclosed with your code. 

The code suggested by acer worked excellenet. I have attached that doc for comparison and correction. Thanks for your effort.

Cheers. Ramakrishnan V
 

restart; with(VectorCalculus); with(Student[LinearAlgebra]); with(plots); v[i] := 145000; thetabn := VectorCalculus:-`*`(1/8, Pi); thetavn := VectorCalculus:-`*`(1/6, Pi); k := 10; omegac := .5; lrange := VectorCalculus:-`*`(6, Pi); v[b] := VectorCalculus:-`*`(cos(VectorCalculus:-`*`(2, thetabn)), 1/cos(thetabn)); v[g] := VectorCalculus:-`*`(sin(VectorCalculus:-`*`(2, thetabn)), 1/cos(thetabn)); n := `<,>`(VectorCalculus:-`*`(k, cos(thetabn)), VectorCalculus:-`*`(k, sin(thetabn)), 0); vr := [VectorCalculus:-`*`(v[b], t), VectorCalculus:-`*`(VectorCalculus:-`*`(v[g], sin(VectorCalculus:-`*`(omegac, t))), 1/omegac), VectorCalculus:-`*`(VectorCalculus:-`*`(v[g], cos(VectorCalculus:-`*`(omegac, t))), 1/omegac)]; lambda := VectorCalculus:-`*`(VectorCalculus:-`*`(v[i], cos(thetavn)), 1/cos(thetabn)); pt := [t, 0, VectorCalculus:-`*`(v[g], 1/omegac)]; pline := proc (A) options operator, arrow; display(plottools:-line(eval(pt, t = lrange), eval(pt, t = A), thickness = 3)) end proc; shockplot := PlanePlot(n, caption = "", planeoptions = [colour = blue, transparency = .5], normaloptions = [shape = cylindrical_arrow, colour = red]); t1 := textplot3d([VectorCalculus:-`*`(k, cos(thetabn)), VectorCalculus:-`*`(k, sin(thetabn)), 0, 'n'], align = above); B := animate(pline, [A], A = lrange .. 0, paraminfo = false, background = display(shockplot, t1)); C := animate(spacecurve, [[VectorCalculus:-`*`(v[b], t), VectorCalculus:-`*`(VectorCalculus:-`*`(v[g], sin(VectorCalculus:-`*`(omegac, t))), 1/omegac), VectorCalculus:-`*`(VectorCalculus:-`*`(v[g], cos(VectorCalculus:-`*`(omegac, t))), 1/omegac)], t = 0 .. x, colour = red, thickness = 2], x = 0 .. lrange, paraminfo = false, labels = [" ", zeta, xi], background = display(shockplot, t1, pline(0))); display([B, C], insequence, axes = none, orientation = [-158, -17, 0], scaling = constrained)

 

``

 


 

restart

Digits := 15; print(["Sample", "tDiff", "tDiffPC"]); for i to 10 do t1PC := Now(ProcessClock); t1 := time[real](); for j to 1000 do j := j+1 end do; t2PC := Now(ProcessClock); t2 := time[real](); tDiff := t2-t1; tDiffPC := t2PC-t1PC; v := array([i, tDiff, tDiffPC]); print(v) end do

                 ["Sample", "tDiff", "tDiffPC"]
                      [1, 0.002, Unit(ns)]
                       [2, 0., Unit(ns)]
                      [3, 0.003, Unit(ns)]
                      [4, 0.002, Unit(ns)]
                       [5, 0., Unit(ns)]
                           [6, 0., 0]
                         [7, 0.003, 0]
                       [8, 0., Unit(ns)]
                      [9, 0.002, Unit(ns)]
                         [10, 0.001, 0]
 

(1)

``


 

Download PrecisionAccuracy.mw

@Carl Love 

I understand from your explanation that

The PC timings are more accurate to nanoseconds.

Precision (variation) is due to the processing of inbuilt applications currently running like security apps).

Excellent.

Thank you so much.

@acer 

Dear Sir, I found out the mistake. 
 

t1 := time[real]()

119.603

(1)

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

t2 := time[real]()

119.644

(2)

``

t2-t1

0.41e-1

(3)

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

t1

119.603

(4)

``

t2

119.644

(5)

t2-t1

0.41e-1

(6)

``


 

Download timeToRun.mw

It is working fine. Thanks.

Ramakrishnan V

@acer the same t1 value will not be assigned afterwards.

@acer 

Thank you so much.

I tried and got it.

t1 := time[real]();
               "for i = 1 to 1000  i:=i+1  end;"
t2 := time[real]();
                          t2 := 99.705

But t1 is lost and i can not find the difference between t1 and t2.

Could you help me please?

Cheers.

Ramakrishnan
 

t1 := time[real]()

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

t2 := time[real]()

99.705

(1)

t1

t1

(2)

t2

99.705

(3)

t1

t1

(4)

t2-t1

99.705-t1

(5)

t1 := time[real]()

373.384

(6)

``


 

Download timeToRun.mw

 

 

@acer 

Thank you very much. Here I want for only a = 1 and not for varying 'a' values.

Yours is useful for making animation for sinusoidal functions of the form

function = verticalShift + VerticalStretch(Trig.Fn(Frequency*x + HorizontalTranslation)

y = a sin(bx+c)+d

Thank toy so much.

Ramakrishnan V

@tomleslie 

Amazing. One command line added does the trick. 

Do(q = %MathContainer0);
  Do(p = eval(q));
  # Do(%Plot0 = plot(p, x = 0..2*Pi));
  Do(%Plot0 = plots:-animate(plot, [p, x =0..t], t=0..10));
  SetProperty("Plot0", ':-play', true, ':-refresh'=true);

I will try pause command also similarly to make the user use the same button to pause and play.

SetProperty("Plot0", ':-pause', true, ':-refresh'=true);

Thanks.

@Earl 

Thank you very much both of you involved in this conversation. I understood the importance of the Digits command and the accuracy of results. I added the command Digits:=15 and the results and plot tally. Thank you so much.

Download Int_Question_answer.mw
 

restart; with(plots); with(ScientificConstants); Digits := 15

15

(1)

g := GetValue(Constant(g))

9.80665

(2)

TP := proc (R, Vzero) sqrt((1/2)*R/g)*(int(1/sqrt(1+(1/2)*Vzero^2/(g*R)-cos(theta)), theta = 0 .. arccos(2/3+(1/3)*Vzero^2/(g*R)))) end proc

evalf(TP(3, 1.2*10^(-3)))

4.95088511960389

(3)

evalf(TP(3, 1.5*10^(-3)))

4.82746536424607

(4)

evalf(TP(3, 10^(-4)))

6.32528075210332

(5)

R := 3; plot(sqrt(R/(2*g))*(int(1/sqrt(1+Vzero^2/(2*g*R)-cos(theta)), theta = 0 .. arccos(2/3+Vzero^2/(3*g*R)))), Vzero = 10^(-4) .. 1.5*10^(-3))

 

TP(3, 0.2e-3); Vzero := 0.2e-3

5.94189995191646

 

0.2e-3

(6)

sqrt(R/(2*g))*(int(1/sqrt(1+Vzero^2/(2*g*R)-cos(theta)), theta = 0 .. arccos(2/3+Vzero^2/(3*g*R))))

Vzero := 0.4e-4

 

 

5.94189995191646

 

0.4e-4

(7)

sqrt(R/(2*g))*(int(1/sqrt(1+Vzero^2/(2*g*R)-cos(theta)), theta = 0 .. arccos(2/3+Vzero^2/(3*g*R))))

6.83209756585927

(8)

``


 

Download Int_Question_answer.mw

 

Ramakrishnan V

Thank you. Answer is clear now. Ramakrishnan.

@vv 

In line 5,  as shown below, it gives an error msg in doc mode. How do I rectify this?

v / sqrt(v^+ . v):
T := simplify(%)

Error, invalid power
Typesetting:-mambiguous(restartsemi  withApplyFunction(plots)colon  r Assign 

  (xApplyFunction(t)commafApplyFunction(xApplyFunction(t)))colon  v Assign diffApplyFunction

  (rcommat)colon  v sol sqrtApplyFunction(Typesetting:-mambiguous(

  vcirc + , Typesetting:-merror("invalid power")) period v)colon  T Assign simplifyApplyFunction

  (%)colon  N Assign ( uminus0T(2)comma T(1) )colon  F Assign (0

  commauminus0mastg)  +  nastN uminus0 muastnastTastsignumApplyF\

  unction(diffApplyFunction(xApplyFunction(t)commat))colon  mast

  diffApplyFunction(vcommat) equals;&tilde Fcolon  DE Assign 

  convertApplyFunction(%comma list)colon  solveApplyFunction(DE

  comma (diffApplyFunction(xApplyFunction(t)commatcommat)comma n)

  )colon  selectApplyFunction(hascomma %comma diffApplyFunction(x

  ApplyFunction(t)commatcommat))colon  de Assign %()colon   myde 

  Assign evalApplyFunction(decomma (f equals (x rarr xcirc2)comma

   mequals1comma gequals1comma muequals1sol10))colon  ic Assign x

  ApplyFunction(0)equals0comma DApplyFunction(x)ApplyFunction(0)

  equals1colon  dsol1 Assign dsolveApplyFunction((mydecomma ic)

  comma numericcomma outputequalslistprocedure)colon  ptAssignevalApplyFunction

  (tcomma dsol1)colon pxAssignevalApplyFunction(xApplyFunction(t)

  comma dsol1)colon  tmaxAssign13.55colon  parabAssignplotApplyF\

  unction((pxApplyFunction(t)commapxApplyFunction(t)circ2commat

  equals0period;&periodtmax)commacolorequalsblue)colon  animate

  ApplyFunction(plotcomma (((pxApplyFunction(t)commapx

  ApplyFunction(t)circ2))commastyleequalspointcommasymbolsize

  equals30)comma tequals0period;&periodtmaxcomma framesequals100

  comma backgroundequalsparab)semi)

@Joe Riel 

Dear Sir, Thanks for your procedure. It works outside, but when I take it inside textbox edit action, the string remains for one value and one gets converted. I am still working on it and hope to succeed calling the procedure from inside the textarea edit region. Cheers. Ramakrishnan V


 


NULL

NULL

NULL

NULL


 

Download I_gotNumericAnswerinTextArea.mw

 

@Carl Love 

Oh! It is an excellent one line command I used inside the edit changed textbox(0 and 1) content 's and it worked fine. I have not used the word macro (deleted the word macro) and it still works. Why the word macro is there? 

Thanks.

Regards.

RamakrishnanV

 

@Carl Love 

Thanks. Awaiting an example for procedure and module combination. Cheers. Ramki..

 

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