Ramakrishnan

Dr. Ramakrishnan Vaidyanathan

279 Reputation

5 Badges

5 years, 50 days

Social Networks and Content at Maplesoft.com

I have retired as Professor-Mechanical in Sri Venkateswara College of Engineering and Technology under Anna University affiliated colleges in Tamil Nadu, India. I have 19 years of Industrial and 20 years of teaching experience. I am learning Maple for the past four and half years hoping to make at least one appreciable maple presentation.

MaplePrimes Activity


These are replies submitted by Ramakrishnan

@Daniel Skoog 

Dear Daniel,

Thank you very much for being very practical in your answers to the doubts raised by me long ago. In fact I was about to lose hope of getting help, when this response from you has rekindled my energy to continue working with plot components more and more. Very useful answer it is for me.

Cheers. Ramakrishnan V


 

The following supporting points may be considered.

restart

sqrt(x)=-I can be solved as follows;Hence coulditbe(sqrt(x)=-I)  is true as per Maple.

sqrt(x) = -I

x := (-I)^2

-1

(1)

Dividing by zero is undefined; Hence solve(1/x=0,x) is not answered by Maple.

However as an approximation, 0.00001 is zero.Hence coulditbe(1/x)=0) is true as per Maple.

solve(1/x1 = 0.1e-7, x1)"(->)"0.10000e6

1/1000000

1/1000000

(2)

"(->)"

0.10000e-5

(3)

solve(sqrt(x2) = -I, x2)``

Also, Maple keeps silence for above statement, because (-I)^2 is not defined.


 

Download coulditbe_points.mw

coulditbe_points.mw

@_Maxim_ 

@Markiyan Hirnyk 

I have not executed the doc after changing the < sign and hence the mistake. I am sorry. Maple gives the same correct answer always.


 

restart

coulditbe(3*I = 0)

false

(1)

coulditbe(3*I > 0)

false

(2)

coulditbe(3*I < 0)

false

(3)

coulditbe(-2+3*I = 0)

false

(4)

coulditbe(abs(I) > 0)

true

(5)

``

coulditbe(2+3*I < 0)

false

(6)

NULL

NULL

What is your opinion?

My opinion from the above is : When a is real and b is complex, a and b can not be compared.

Like number of goats and number of lions  can not be added to give an answer in number of lions alone or number of goats alone!!
Riemann's function Zeta is a function of Complex number

 

solve(abs(Zeta(s+2*I)) = 0, s)

-2*I+RootOf(Zeta(_Z))

(7)

"(->)"

-2.0000-2.*I

(8)

``

solve(Zeta(s+2*I) = 0, s)

-2*I+RootOf(Zeta(_Z))

(9)

"(->)"

-2.0000-2.*I

(10)

What does the above results convey??

Am I correct if i state that 's' should be a complex number only and not a real number.


 

Download s_is_complex.mw

"quod erat demonstrandum" i.e. "Proof neads demonstration" is absolutely right with Riemann's zeta as a function of complex numbers..

In my humble opinion, we can not answer if some one asks us, "what is 3a compared to 4b?", unless we know about a and b!!

In the assumption we have made here, s > 0 or s < 1/2, we compare s as only real number where as s is a complex number involving imaginary ones about which we donot know. I can not say (-1)^0.5 > 0. Not even 10((-1)^0.5) > 0.

I am just a novice with high regards for Riemann and hence commented. 

It seems from the attached doc, s may be a complex number only.

Thanks. Cheers.


 

restart; assume(s > 0, s < 1/2, t > 0); coulditbe(abs(Zeta(s+I*t)) = 0)

true

(1)

coulditbe(Zeta(s+I*t) = 0)

FAIL

(2)

solve(Zeta(s+I*t) = 0, s)

-I*t+RootOf(Zeta(_Z))

(3)

solve(abs(Zeta(s+I*t)) = 0, s)

-I*t+RootOf(Zeta(_Z))

(4)

``


 

Download what_is_s.mw

what_is_s.mw

@Carl Love 

Thank you very much for letting me know about the print levels and careful programming needs. It is great. Though i have undisputed confidence in Maple, in this particular case, I was little shaken by Maple. Your response has taught me that Maple does that with a purpose and I need to learn a lot more interesting facts about Maple! Cheers. Ramakrishnan V

@tomleslie 

Yes. Copy paste (No cut paste) may be the culprit. Also from your document (with subscripted like data 1,2 variables in place of indexed variables like data[1][2] in my doc), i suspect i have faulted in atomic variable option selection (I donot know much about it and typesetting). I understand it is my problem only tofind out the culprit text by comparing the original and this one. Unfortunately I am more worried about the old original doc (and the time and tension it generates i cannot stand at my age). Hence i will do by retyping the codes all and check. Thanks for the trouble taken by you and CarlLove.

Cheers.

Another excellent solution I got from Dr.Robert, to do it in single loop,
 

restart

R1 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 2.36; BTE := .271; sfc := .308; Data[1, 1] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]
NULL

R2 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 2.75; BTE := .298; sfc := .282; Data[1, 2] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R3 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 3.14; BTE := .318; sfc := .264; Data[1, 3] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

``

R1 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 2.37; BTE := .323; sfc := .258; Data[2, 1] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R2 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 2.76; BTE := .350; sfc := .239; Data[2, 2] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R3 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 3.15; BTE := .369; sfc := .229; Data[2, 3] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

``

Try doing it the following way:

NULL

NULL

for i to 2 do N[i] := seq(Data[i, k][4], k = 1 .. 3) end do

2.37, 2.76, 3.15

(1)

``

N[1] = 2.36, 2.75, 3.14 

N[2] = 2.37, 2.76, 3.15 

 

NULL

``


 

Download ExcellentAnswer_A_ReactantValues.mw

ExcellentAnswer_A_ReactantValues.mw

is attached.

 

 

restart

R1 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 2.36; BTE := .271; sfc := .308; Data[1, 1] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]
NULL

R2 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 2.75; BTE := .298; sfc := .282; Data[1, 2] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R3 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 3.14; BTE := .318; sfc := .264; Data[1, 3] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

``

R1 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 2.36; BTE := .323; sfc := .258; Data[2, 1] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R2 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 2.75; BTE := .350; sfc := .239; Data[2, 2] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R3 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 3.14; BTE := .369; sfc := .229; Data[2, 3] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

``

``

``

for i to 2 do N[i] := NULL; for j to 3 do N[i] := N[i], Data[i, j][4] end do end do

Error, `,` unexpected

 

N[1]

2.36, 2.75, 3.14

(1)

N[2]

2.36, 2.75, 3.14

(2)


If I change NULL to [NULL], the Error, `,` unexpected does not show, but N[1] and N[2] has fisrt value as empty cell. that is [], 2.36, 2.75, 3.14

I want the error to be removed and output as it is 2.36, 2.75, 3.14 and not as
"[],2.36,2.75,3.14  Can you help please"?""


 

Download Doubt_A_ReactantValues.mw

@Carl Love 

ok Thanks

 


 

eq1 := 3*x^2+x+2

HERE BRING THE MOUSE and PRESS CTRL+DELETE buttons.

if diff(eq1(x), x) = 6*x+1 then print(yes) else print(no) end if

yes

(1)

"Another command Prompt(>). HERE BRING THE MOUSE and PRESS CTRL+DELETE buttons."

eq1 := 3*x^2+x+2


 

Download where.mw

where.mw

an empty cell. Where does it show? Thannks.

 

If it is command pronpts with no commands in the line, then what CarlLove is correct. I used to cut the next command lines and paste there!!
 

 

@Carl Love 

I hv attached the doc and copied from edit menu the startup code in the worksheet. Hope this helps to you to guide me. However module output is not used by me in this doc. The first loop can be removed to prevent module function to perform.

If i use [NULL], then the error goes, but [ ] is assed in the list as first value.

Thanks.Doubt_A_ReactantValues.mw
 

Data made for Data[i,j] [k] where i =1,2; j=1..8. Each Data has 6 values. k = 1..6

For each data i got an output list of 6 values using a module;

I made a for do statement which performs but gives an error "unexpected ','.

Can any onr help to find my mistake. Thanks.

 

restart

R1 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 2.36; BTE := .271; sfc := .308; Data[1, 1] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]
``

R2 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 2.75; BTE := .298; sfc := .282; Data[1, 2] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R3 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 3.14; BTE := .318; sfc := .264; Data[1, 3] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R4 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 3.53; BTE := .330; sfc := .253; Data[1, 4] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R5 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 3.88; BTE := .334; sfc := .249; Data[1, 5] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R6 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 3.93; BTE := .334; sfc := .249; Data[1, 6] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R7 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 4.32; BTE := .330; sfc := .253; Data[1, 7] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R8 := "SE2"; BP__ref := 3.93; BTE__optimum := .334; BP := 4.71; BTE := .318; sfc := .264; Data[1, 8] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

``

R1 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 2.36; BTE := .323; sfc := .258; Data[2, 1] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R2 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 2.75; BTE := .350; sfc := .239; Data[2, 2] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R3 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 3.14; BTE := .369; sfc := .229; Data[2, 3] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R4 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 3.53; BTE := .380; sfc := .219; Data[2, 4] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R5 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 3.88; BTE := .383; sfc := .217; Data[2, 5] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R6 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 3.88; BTE := .383; sfc := .217; Data[2, 6] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R7 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 4.32; BTE := .378; sfc := .221; Data[2, 7] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

R8 := "4S"; BP__ref := 3.88; BTE__optimum := .383; BP := 4.71; BTE := .365; sfc := .229; Data[2, 8] := [R1, BP__ref, BTE__optimum, BP, BTE, sfc]

 

NULL

Data[1, 8][4]

4.71

(1)

NULL

NULL

for i to 2 do for j to 8 do y[i, j] := action1:-Mproc(Data[i, j]); print(Data[i, j], y[i, j]) end do end do

["4S", 3.88, .383, 4.71, .365, .229], ["4S", .4311313490, 0.5411807293e-1, 0.3357509744e-1, .4235561571, 0.6183000001e-1]

(2)

``

N1 := NULL; for j to 8 do N1 := N1, Data[1, j][4] end do; print(N1)

2.36, 2.75, 3.14, 3.53, 3.88, 3.93, 4.32, 4.71

(3)

for i to 2 do N[i] := NULL; for j to 8 do N[i] := N[i], Data[i, j][4] end do end do; print(N[2])

Error, `,` unexpected

 

N[2]

2.36, 2.75, 3.14, 3.53, 3.88, 3.88, 4.32, 4.71

(4)

N[1]

2.36, 2.75, 3.14, 3.53, 3.88, 3.93, 4.32, 4.71

(5)

with(MathematicalFunctions); action1 := module () export Mproc, y;  Mproc := proc (Data) R7 := Data[1]; BP__ref := Data[2]; BTE__optimum := Data[3]; BP := Data[4]; BTE := Data[5]; sfc := Data[6]; sfcmoles := (1/114)*sfc; ea := .1; c1 := .1; c2 := .2; n__f := sfcmoles; `n__air,act` := 12.5*n__f*(1+ea)*sfcmoles/.21; f__ncg := combine(piecewise(BTE < .5, 1-2*BTE, .5 <= BTE, BTE)); f__cg := 1-f__ncg; f__nox := combine(piecewise(BP < BP__ref, c1*BP/BP__ref, BP__ref < BP, c1*BP/BP__ref)); f__co := combine(piecewise(BP < BP__ref, c2*BP/BP__ref, BP__ref < BP, c2*BP__ref/BP)); k__o2 := 12.5; k__co := 8; `n__o2,st` := n__f*k__o2; `n__air,st` := `n__o2,st`/.21; f__ea := ea; `n__air,act` := `n__o2,st`*(1+f__ea)/.21; n__7 := f__ncg*n__f; n__N2 := .79*`n__air,act`; n__O2 := .21*`n__air,act`; n__2 := n__f*f__cg*f__co*k__co; n__1 := 8*n__f-n__2-8*n__7; n__3 := 9*n__f-9*n__7; n__5 := f__cg*f__nox*n__N2; n__4 := (1/2)*.21*2*`n__air,act`-n__1-(1/2)*n__2-(1/2)*n__3-n__5; n__6 := (1/2)*.79*2*`n__air,act`-(1/2)*n__5; y := [R7, 44*n__1, 28*n__2, 32*n__4, 46*n__5, 114*n__7] end proc end module


 

Download Doubt_A_ReactantValues.mw

 

@Carl Love 

Yes. It works and i enclose the doc... Thanks. 

Ramakrishnan V

 

 

 


 

                                                                                         
with(DocumentTools); for i to 12 do SetProperty("RotaryGauge0", value, 6); print(SetProperty("RotaryGauge1", value, .66*GetProperty("RotaryGauge0", value))); time*[]; 3^100; GetProperty("RotaryGauge0", value); print(SetProperty("RotaryGauge0", value, 4)); print(SetProperty("RotaryGauge1", value, .7*GetProperty("RotaryGauge0", value))); time[real](); 3^100; print(SetProperty("RotaryGauge0", value, 2)); print(SetProperty("RotaryGauge1", value, .5*GetProperty("RotaryGauge0", value))); time[real](); 3^100 end do

(1)

NULL


 

Download varying_input.mw

varying_input.mw

@Ramakrishnan 

 "Say No to dialogue box "Do you wish To save these results"." (This does not affect the performance when opened again.)
Rightclick in Navigator window attach file fig1.bmp
Save as workbook (.maple file).

Saying Yes to save summary results generates the error because semicolons and colons are missing in our doc. After correction, it saves well. I attach pdf of workbook since workbooks are not uploaded.

Fig3.pdf

Fig2.maple

Fig2.pdf

@Carl Love 

A colon does completely supresses all outputs including the change in RotaryGauge0 (RG0) indication. Please send me doc corrected with output changing (or input changing in RG0)

Thanks.

Ramakrishnan V

varying_input.mw

@Preben Alsholm 

Thanks to the problem provided however it may look to any, and the final codes from Preben Alsholm  for check, gave many a lessons to me. I have learnt the art of using random numbers and function generators for checking typical situation like this. Thanks. Ramakrishnan V

A good post. Worth learning. Gives complex ideas. A detailed naration in awebinar will be useful to bright students. Congratulations to the author.

Ramakrishnan

@Ramakrishnan 

-2 on RHS with coef of x3 increased by 1 (i.e 42 to 43) gives a unique solution in maple.
 

restart
eq1 := 1752*x1+384*x2+384*x3+72*x4 = 0

1752*x1+384*x2+384*x3+72*x4 = 0

(1)

eq2 := 384*x1+366*x2+43*x3-144*x4 = -2

384*x1+366*x2+43*x3-144*x4 = -2

(2)

eq3 := 384*x1+42*x2+366*x3-144*x4 = 0

384*x1+42*x2+366*x3-144*x4 = 0

(3)

eq4 := 72*x1-144*x2-144*x3+216*x4 = 0

72*x1-144*x2-144*x3+216*x4 = 0

(4)

solve({eq1, eq2, eq3, eq4}, [x1, x2, x3, x4])

[[x1 = 1, x2 = -2, x3 = -2, x4 = -3]]

(5)

``

``


 

Download SimEquationsSolved.mwSimEquationsSolved.mw

2 3 4 5 6 7 8 Page 4 of 11