Ramakrishnan

Ramakrishnan Vaidyanathan

289 Reputation

6 Badges

5 years, 141 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

@Rouben Rostamian  

Your 3 line command was very useful in my understanding the logic behind solving coupled odes.

1. Each second order differential equation (for solving),  needs just two known quantities: initial values and initial slope

2. Even coupled equations the above requirements are sufficient.

3. For n number of equations to be solved, 2 n quantities are required.  Here 3 equations and hence 6 initial conditions.

Thank you very much.

Ramakrishnan V

@kambiz1199 

plot command is seen in your doc. Thanks.

rhs is visibly F(t) and not the expression. This is one case where maple (behaves like a human) has rightly nterpretted the middle term as rhs and gives the required plot (y vs t and not F vs t).

Thanks.

Ramakrishnan V.

@kambiz1199 

use of for loop may help.

I am not getting the answer shown in your message. hence i assumed a function (in place of yr rhs of solution
 

y := proc (x) options operator, arrow; x^2 end proc

proc (x) options operator, arrow; x^2 end proc

(1)

y(1)

1

(2)

y(2)

4

(3)

for x from 0 to 8 do y(x) end do

64

(4)

plot(y(x1), x1 = 0 .. 8)

 

``


 

Download UseOfForLoop.mwUseOfForLoop.mw

)and did my code. Enclosed doc for reference. Hope it is useful.

Ramakrishnan V

@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

5 6 7 8 9 10 11 Page 7 of 11