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

@kambiz1199 

Yes. F is a function of time. I am stupid to have realised that maple is smart and will not teach me to be careful.

F(t) is different from F for Maple. i did not realise it.

Thanks for pointing.

Ramakrishnnv

@tomleslie 

I get an error as illegal use of object as a name.

Could you send me the doc for reference

Thanks.

Ramakrishnan V
 

Parse:-ConvertTo1D, "first argument to _Inert_ASSIGN must be assignable"

Error, illegal use of an object as a name

" F:= t-> piecewise( t < 0, 0,  `                 ` ` ` ` ` ` ` ` ` ` ` `  ` ` ` t < 1, 100,  `                 ` ` ` ` ` ` ` ` ` ` ` `  ` ` ` t < 2, 200,  `                   ` ` ` ` ` ` ` ` ` ` ` `  ` t < 3, 50   `                             ` );  ` ` sol:= dsolve( [` ` diff(y(t),t$2)+4*diff(y(t),t)-3=F(t),  `                            ` y(0)=0,  `               ` ` ` ` ` ` ` ` ` ` ` `  ` D(y)(0)=1   `             ` ` ` ` ` ` ` ` ` `  ` ]   `            ` ` ` ` ` ` ` `  ` );  ` ` plot(rhs(sol), t=0..5);"

 

``


 

Download illegalUse_ObjectAsName.mwillegalUse_ObjectAsName.mw

Assign a name for each plot separately say p1 and p2.

p2 := plot([seq(d[k], k = 1 .. 4)], style = point, color = [black, red, green, blue], symbol = solidcircle, symbolsize = 15)

Then use display plots command as follows.

 

plots:-display(p1, p2)

You can also plot command as follows stating all equation separated by comma and appropriate parameters in order correctly.

I have attached documents for both.

Hope they are useful and give you more ideas craetively.

Ramakrishnan  VdisplaycommandUse.mwmultiplotExample.mw
 

 

d[1] := [[1000, 20], [2000, 21], [3000, 32], [4000, 23], [5000, 23]]

d[2] := [[1000, 25], [2000, 26], [3000, 33], [4000, 25], [5000, 24]]

d[3] := [[1000, 26], [2000, 27], [3000, 34], [4000, 26], [5000, 25]]

d[4] := [[1000, 27], [2000, 28], [3000, 25], [4000, 27], [5000, 25]]

 

 

 

d[5] := [[1000, 30], [2000, 31], [3000, 42], [4000, 33], [5000, 43]]

d[6] := [[1000, 35], [2000, 36], [3000, 43], [4000, 35], [5000, 44]]

d[7] := [[1000, 36], [2000, 37], [3000, 44], [4000, 36], [5000, 45]]

d[8] := [[1000, 37], [2000, 38], [3000, 45], [4000, 37], [5000, 45]]

 

 

``

p1 := plot([seq(d[k], k = 1 .. 4)], style = point, color = [black, red, green, blue], symbol = solidcircle, symbolsize = 15); p2 := plot([seq(d[k], k = 5 .. 8)], style = point, color = [black, red, green, blue], symbol = solidcircle, symbolsize = 15)

 

p1 := plot([seq(d[k], k = 1 .. 4)], style = point, color = [black, red, green, blue], symbol = solidcircle, symbolsize = 15)

 

plots:-display(p1, p2)

 

``


 

Download displaycommandUse.mw
 

equn1 := 2*x+3

2*x+3

(1)

equn2 := 3*x+6

3*x+6

(2)

equn3 := 6*x+12

6*x+12

(3)

equn4 := 12*x+2

12*x+2

(4)

plot([equn1, equn2, equn3, equn4], x = 1000 .. 5000, color = [red, blue, green, gold], size = [800, 500], scaling = unconstrained, discont)

 

``


 

Download multiplotExample.mw

 

 

@9009134 

pdsolve each pd equation separately and then solve the three equations for final solution.

For each pdsolve sepending on the type choose the solution. I attach the maple examples for each pdsolve of different types.

Hope this is useful

Ramakrishnan V

PDEsolve.mw

pdsolve2.mw

@Gillee 

It is very simple to get the answer in floating point mode. In the for statement replace 0 with 0.0.

Maple understands that you want the answer in floating point mode and gives you the best answer. It will also give in the number of decimal points you want!

Hope you like this.

Thanks. Ramakrishnannplanets_forLOOP.mw

 

Download nplanets_forLOOP.mw

 

@mehdi jafari 

when x and y are between numbers about -100 and 100 this circle like diagram is included ! but when the range is changed to -10000 and 10000 this is not circle is not so in this scale.

The basics can best be understand from the simple logic that a rail though parallel is not so in long view. In a moving train, all objects move backwards in long view. A circle becomes a dot from a long view.

The same is the case here because what is big in a smaller scale becomes negligible in a larger scale.

The same diagram becomes a yellow rectangle in a different scale large in x direction only.

I attach my doc with different plots for different scales. A careful look at these will clear our doubts that it is same except for the view.


 

eq := 8.620689655172415*10^(-16)*(-3.11*10^23*x^2*y^(7/6)-3.92*10^19*y^(25/6)+2.14545039999999*10^29*(0.108e-1*exp(-45.07/y)+exp(-19.98/y^(1/3)-0.935317203476387e-2*y^2)))/(x*y^(2/3)*(x+0.15e-1*y^1.2)); plots:-inequal(eq > 0, x = -10 .. 10, y = 0 .. 100, color = yellow)

 

plots:-inequal(eq < 0, x = -10 .. 10, y = 0 .. 100, color = yellow)

 

plots:-inequal(eq < 0, x = -1330 .. 1330, y = 0 .. 100, color = yellow)

 

plots:-inequal(eq < 0, x = -10 .. 10, y = 0 .. 1000, color = yellow)

 

``


 

Download solveee2_vrk.mwsolveee2_vrk.mw

Very nice. Thank you for the solution and exact command. Ramakrishnan V

@vv 

@Samir Khan 

Thank you very much.

Ramakrishnan V

The report is very good and I appreciate. I am a novice learning maple and would be interested in looking at your worksheet to get to know something about how to get the data in any location with a flow chart in a monitor.

I will be greatful if the relevant worksheet or manual explaining this aspect is made available for use.

A simple example i would be satisfied with is a rectangle with value by the side. If the value is 0, 0.5 or 1, then the rectangle would be in blue, orange or red.

Thanks.

@Rouben Rostamian  

If you permit, may I raise the following points.

Appending and prepending a data in the format one is already used to in a statement may be  more comfortable for the user than adding a new programme code as follows. (No doubt, more subject knowledge the code gives)

piecewise(s < x[1], y[1], op(tmp)[1 .. -2], s < x[-1], op(tmp)[-1], y[-1])

The above code was not by maple on its own. Maple has to be instructed as above by the user.

data2D := [[1, 2], [3, 4], [5, 10], [20, 30], [40, 50]]

data2D := [[0, 2], [1, 2], [3, 4], [5, 10], [20, 30], [40, 50], [50, 50]]

The statement

piecewise(s < x[1], y[1], op(tmp)[1 .. -2], s < x[-1], op(tmp)[-1], y[-1])

is just replaced by 

[0, 2], [50, 50]

for the same answer and new user knows what he wants.

However your points are well taken and I learnt a different perspective of the solution.

Thanks

Ramakrishnan V

@ThU 

My version is maplesim2015 and hence could not get the document properly. Is it possible to change the doc to open in old version and send?. Explanation in words woud be more useful. Relevant help page reference also could be useful for me to try out the excel input and plot that i want.

Thanks.

Ramakrishnan V

@ThU 

Thank you so much. Your document will be very useful to know how to do it.

Ramakrishnan V

@Ramakrishnan 

Dear Professor,

The constants need to be known. As simple as adding another data at the end by repeating the y data value once more for any x data value in order. Also If you want to see the horizontal give a wider range for x and view (y range).

Hope the attached doc is more closer than what was wanted.

 

Kindly check if i am correct, Maple result earlier would give only an abrupt end and not continuously growing.
 

restart; with(LinearAlgebra); with(CurveFitting); with(plots); with(Statistics)

data2D := [[0, 2], [1, 2], [3, 4], [5, 10], [20, 30], [40, 50], [50, 50]]

[[0, 2], [1, 2], [3, 4], [5, 10], [20, 30], [40, 50], [50, 50]]

(1)

``

f := Spline(data2D, v, degree = 1)

piecewise(v < 1, 2, v < 3, 1+v, v < 5, -5+3*v, v < 20, 10/3+(4/3)*v, v < 40, 10+v, 50)

(2)

"->"``

 

 

plot(piecewise(v < 1, 2, v < 3, 1+v, v < 5, -5+3*v, v < 20, 10/3+(4/3)*v, v < 40, 10+v, 50), v = -30.0 .. 60.0, view = 0 .. 50)

 

``


 

Download Modified_spline_for_mapleprime_26062017.mw

Thanks for reviewing and comments. Cheers.

Ramakrishnan VModified_spline_for_mapleprime_26062017.mw

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Thank you very much.

It gives a clear understanding of the possible (one more) mistake that i must be aware of. Short circuiting through the capacitor (component) itself did not occur to me at all!

This also hs given me a confidence to post umpteen such questions that I gave up whiile doing examples as well as my creations.

The answer with the diagram is superb technique; It made me to understand just in seconds!

Cheers. Ramakrishnan V

Hi!

I followed acer idea. It works. I attach the doc with answer.

Hope it clarifies.

Ramakrishnan V
 

restart

``

expr := (x^2-x-12)/(x-4)

expr

(x^2-x-12)/(x-4)

(1)

evalb(expr = simplify(expr))

false

(2)

simplify(expr)

x+3

(3)

``False answer in line (2) confirms that it is not simplified. It is verified by the simplified answer that we get as (x+3)


 

Download rough.mwrough.mw

5 6 7 8 9 10 11 Page 7 of 11