Ramakrishnan

Ramakrishnan Vaidyanathan

399 Reputation

13 Badges

10 years, 293 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. Published XII Mathematics books.

MaplePrimes Activity


These are answers submitted by Ramakrishnan

Hope my example of a multiplot with three color given below with codes should help you as well.

Ramakrishnan V
 

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

I am not an expert in maple programming.

This try-catch are specials commands I have come across in MATLAB. These are the only ways to correct your programme step by step until you the perfect one is obtained. In that way, I would only suggest that as it is only the first step in the long process of editing our programmes, three more steps are required to be performed.

Step1: Give a correct (simple for which answer is known) input, run the programme and check for the errors. Thus 'User Errors' is eliminated.

Step2: Check for the condition that your problem has a unique solution, multi-solution or no solution. If it satisfies the condition, Thus 'No Solution'  is verified to be incorrect.

Step 3: Maple errors. In this case, run the program step by step check for values of doubtful variables and correct until the end of the programmed codes.

Hope this is in order for getting into the solution successfully.

Thanks for the patience and taking my suggestions.

Ramakrishnan V

This has reference to the 'analytical solution available' mentioned in the question. What is that?

ibcs := {H(0) = 0, l(x, 0) = 1, l(H(t), 0) = 1, sh(x, 0) = 0, sh(H(t), t) = 0, sv(x, 0) = 0, sv(H(t), t) = 0, u(0, t) = 0, u(x, 0) = 0};
res := pdsolve(pde_sys, ibcs, numeric, time = t, range = 0 .. H(t));

initial boundary conditions mean boundary conditions at t = 0 , but given conditions use H(t) ,t

May be the problem lies there.

Hope this is useful

Ramakrishnan V
 

In my opinion, any plot is possible only if you have the set of values in order. If there are 10 x values, then you must have a corresponding 10 y values. If y is the function of x as a variable in it, then, the above condition is satisfied and it is possible to plot x vs y. If there is another function say x1 which is a function of x, then again the above condition is satisfied and you can plot x1 vs y.

It goes on and in this way, you can plot y vs x1*x2 (i.e. the product of x1 and x2). In the query, it is difficult to get such relation among V(r), E0 and B0.

Assuming all the are functions of say a variable r, then find V(r), E0(r) and B0(r) for say 5 values of r (=0.1, 10,100,1000,10000 just like that I gave, it can be like 1,2,3,4, and 5 as well). For example, E(r) = r, B0(r) = r*r, and E0(r) = 3r  and r = 1,3,5,7,8 and 9.

Then V = [1, 3,  5, 7,  8,  9]; B0 = [ 1, 9, 25, 49, 64] and E0 = [ 3, 9, 15, 24, 27].

 

Then only it is easy for anyone (software) to plot using plot command plot(E0, V) or plot(E0*B0, V).Hope this helps in making your plot easily possible.Ramakrishnan V

I donot know much but want to be the first to answer you since question looks simple though it is from an expert in maths. Select File > New > Document mode (Not worksheet mode)

StringTools is the package you can refer to if it is maths with strings! Even symbols are considered as strings in maplesoft. 

Document is the best one to open rather than worksheet. It is almost same except minor the prompts and use of native (simple) maths.

To load the package type the commands given below.

with(StringTools):

I hv attached a doc (results inserted below) small one with what i know. Hope this will help to learn more.

If it is real maths with numbers and basic, then i spent much time to know the difference between assignment (:=) and equation (=) commands. Dive in to to learn. It is simple and easy.

Cheers. RamakrishnanV
 

restart

4+9

13

(1)

a := 9

9

(2)

with(StringTools)

IsPalindrome("semitimes")

true

(3)

convert(a, string)

"9"

(4)

a+10

19

(5)

convert(c*d+a+b, string)

"c*d+b+9"

(6)

 

convert("a"+b+c*d, string)

""a"+b+c*d"

(7)

convert('a'+b+c*d, string)

"c*d+a+b"

(8)

Clicked Text on top and typed the following.
Clicked Math and typed commands below.

a := 9

9

(9)

b = 2*a

b = 18

(10)

b

b

(11)

Note b is not assigned.

b := 2*a

18

(12)

b

18

(13)

Now b is assigned.

equations can be solved.

Just type solve and ? in math mode.
If the question is somewhat high standard, sorry for this beginners work here.

Cheers.

Ramakrishnan V


 

Download addition_strings.mw


Kitonum's second method seems very easy for use. Cheers. Ramakrishnan V

restart

for i to 100 do s[i] := sin(teta[i]); c[i] := cos(teta[i]) end do

s[45]

sin(teta[45])

(1)

for i to 100 do teta[i] := 5*i end do

500

(2)

teta[1]; teta[5]

5

(3)

``

25

(4)

A := Matrix(10, 10, {(1, 1) = s[1]*c[1], (1, 2) = s[1]*c[1], (1, 3) = s[1]*c[1], (1, 4) = s[1]*c[1], (1, 5) = s[1]*c[1], (1, 6) = s[1]*c[1], (1, 7) = s[1]*c[1], (1, 8) = s[1]*c[1], (1, 9) = s[1]*c[1], (1, 10) = s[1]*c[1], (2, 1) = s[1]*c[1], (2, 2) = s[1]*c[1], (2, 3) = s[1]*c[1], (2, 4) = s[1]*c[1], (2, 5) = s[1]*c[1], (2, 6) = s[1]*c[1], (2, 7) = s[1]*c[1], (2, 8) = s[1]*c[1], (2, 9) = s[1]*c[1], (2, 10) = s[1]*c[1], (3, 1) = s[1]*c[1], (3, 2) = s[1]*c[1], (3, 3) = s[1]*c[1], (3, 4) = s[1]*c[1], (3, 5) = s[1]*c[1], (3, 6) = s[1]*c[1], (3, 7) = s[1]*c[1], (3, 8) = s[1]*c[1], (3, 9) = s[1]*c[1], (3, 10) = s[1]*c[1], (4, 1) = s[1]*c[1], (4, 2) = s[1]*c[1], (4, 3) = s[1]*c[1], (4, 4) = s[1]*c[1], (4, 5) = s[1]*c[1], (4, 6) = s[1]*c[1], (4, 7) = s[1]*c[1], (4, 8) = s[1]*c[1], (4, 9) = s[1]*c[1], (4, 10) = s[1]*c[1], (5, 1) = s[1]*c[1], (5, 2) = s[1]*c[1], (5, 3) = s[1]*c[1], (5, 4) = s[1]*c[1], (5, 5) = s[1]*c[1], (5, 6) = s[1]*c[1], (5, 7) = s[1]*c[1], (5, 8) = s[1]*c[1], (5, 9) = s[1]*c[1], (5, 10) = s[1]*c[1], (6, 1) = s[1]*c[1], (6, 2) = s[1]*c[1], (6, 3) = s[1]*c[1], (6, 4) = s[45]*c[45], (6, 5) = s[1]*c[1], (6, 6) = s[1]*c[1], (6, 7) = s[1]*c[1], (6, 8) = s[1]*c[1], (6, 9) = s[1]*c[1], (6, 10) = s[1]*c[1], (7, 1) = s[1]*c[1], (7, 2) = s[1]*c[1], (7, 3) = s[1]*c[1], (7, 4) = s[1]*c[1], (7, 5) = s[1]*c[1], (7, 6) = s[1]*c[1], (7, 7) = s[1]*c[1], (7, 8) = s[1]*c[1], (7, 9) = s[1]*c[1], (7, 10) = s[1]*c[1], (8, 1) = s[1]*c[1], (8, 2) = s[1]*c[1], (8, 3) = s[1]*c[1], (8, 4) = s[1]*c[1], (8, 5) = s[1]*c[1], (8, 6) = s[1]*c[1], (8, 7) = s[1]*c[1], (8, 8) = s[1]*c[1], (8, 9) = s[1]*c[1], (8, 10) = s[1]*c[1], (9, 1) = s[1]*c[1], (9, 2) = s[1]*c[1], (9, 3) = s[1]*c[1], (9, 4) = s[1]*c[1], (9, 5) = s[1]*c[1], (9, 6) = s[1]*c[1], (9, 7) = s[1]*c[1], (9, 8) = s[1]*c[1], (9, 9) = s[1]*c[1], (9, 10) = s[100]*c[1], (10, 1) = s[1]*c[1], (10, 2) = s[1]*c[1], (10, 3) = s[1]*c[1], (10, 4) = s[1]*c[1], (10, 5) = s[1]*c[1], (10, 6) = s[1]*c[1], (10, 7) = s[1]*c[1], (10, 8) = s[1]*c[1], (10, 9) = s[1]*c[1], (10, 10) = s[1]*c[100]})

Matrix(%id = 18446745917154647086)

(5)

"(->)"

0

(6)

``


 

Download shortNotation_sin_cos_terms.mw

shortNotation_sin_cos_terms.mw

I have obtained the plot you want for Cd as a function of V (in terms of  velocity components vx and vy). Hope this is ok?

However I have made a change while plotting i,e vx and vy as x and y for plotting.Later i changed the label. Someone can help me if we can plot retaining vx and vy as well.

Thanks.
 

`` ``

restart

V := proc (vx, vy) options operator, arrow; abs((vx^2+vy^2)^.5) end proc

proc (vx, vy) options operator, arrow; abs((vx^2+vy^2)^.5) end proc

(1)

F__D := (3*Pi*mu*d+(1/8)*Pi*C__o*rho*d^2*V(vx, vy))*V(vx, vy)

(3*Pi*mu*d+(1/8)*Pi*C__o*rho*d^2*abs(vx^2+vy^2)^.5)*abs(vx^2+vy^2)^.5

(2)

F__D1 := (1/8)*C__D*Pi*rho*d^2*V(vx, vy)^2

(1/8)*C__D*Pi*rho*d^2*abs(vx^2+vy^2)^1.0

(3)

mu := .1; d := .2; C__o := .1; rho := .9

.9

(4)

solve(F__D = F__D1, C__D)

0.3333333333e-1*(3.*abs(vx^2+vy^2)+400.*abs(vx^2+vy^2)^(1/2))/abs(vx^2+vy^2)

(5)

``

 

 

plot3d((0.3333333333e-1*(3.*abs(x^2+y^2)+400.*sqrt(abs(x^2+y^2))))/abs(x^2+y^2), x = 1 .. 5, y = 1 .. 5)

 

How do I plot without modifying the vx and vy to x and y?


 

Download Cd_vx_vy_answer1.mw

sum(1/k^1.5, k = 1 .. infinity);
                          2.612375349
sum(k/(2*k+3), k = 1 .. infinity);
                            infinity
sum(1/(3/k+2), k = 1 .. infinity);
                            infinity
sum(k^1.5, k = 1 .. infinity);
                        Float(infinity)


sum(1/k^1.5*(k/(2*k+3)), k = 1 .. infinity);
                                             0.83769


 

``

sum(1/k^1.5, k = 1 .. infinity)

2.612375349

(1)

sum(k/(2*k+3), k = 1 .. infinity)

infinity

(2)

sum(1/(3/k+2), k = 1 .. infinity)

infinity

(3)

sum(k^1.5, k = 1 .. infinity)

Float(infinity)

(4)

``

 

sum(1/(k^(1/2)*(2.*k+3.)), k = 1 .. infinity)

(5)

"(->)"

.83769

(6)

``


 

Download limitsum.mw

limitsum.mw

variable is n or k? Only one variable is allowed here.

Hope attached workbook helps you understand problems in your case. bmp file and mw files are in workbook itself. 

Ramakrishnan V

Fig1.maple

 

 

 

Two linear equations in two variables (say A and B) are required to solve (obtain the values of) the variables.

Here in the Original Problem, A and B are variables. Hence two equations are required to obtain A and B.

The equations being differential, for each order, one condition (initial, A , B at t = T)) required for each variable).

The equations being being differential in second order, one more condition (slope dA/dt, dB/dt at t =T)required for each variable.

without any of these inputs, Maple will provide many solutions with umpteen variations or keep quiet.

A solution from only one second order differential equation in two variable with out the supporting conditions is therefore a difficult one for anyone.

I tried my best to cover 18 terms. (It takes more time and checks your patience and when come across a mistake or inconsistency we
 

``

``

h := proc (t) options operator, arrow; abs(-(10/3938980639167)*exp(50*I)*t+(90*I)*exp(80*I)*t) end proc

proc (t) options operator, arrow; abs(-(10/3938980639167)*exp(50*I)*t+(90*I)*exp(80*I)*t) end proc

(1)

````plot(h(t), t = 0 .. 2*Pi)

 

 

 

k1 := -(630*I)*exp((40*I)*t)-70*I+945*Pi*exp((45*I)*t)

-(630*I)*exp((40*I)*t)-70*I+945*Pi*exp((45*I)*t)

(2)

````

``

k2 := (70*I)*exp((90*I)*t)-(70*I)*exp((72*I)*t)

(70*I)*exp((90*I)*t)-(70*I)*exp((72*I)*t)

(3)

k3 := -(90*I)*exp((66*I)*t)-(70*I)*exp((63*I)*t)

-(90*I)*exp((66*I)*t)-(70*I)*exp((63*I)*t)

(4)

k4 := (84*I)*exp((60*I)*t)-(90*I)*exp((59*I)*t)

(84*I)*exp((60*I)*t)-(90*I)*exp((59*I)*t)

(5)

k5 := -(126*I)*exp((55*I)*t)-(210*I)*exp((54*I)*t)

-(126*I)*exp((55*I)*t)-(210*I)*exp((54*I)*t)

(6)

k6 := -(210*I)*exp((51*I)*t)-(630*I)*exp((48*I)*t)

-(210*I)*exp((51*I)*t)-(630*I)*exp((48*I)*t)

(7)

``

k7 := -(630*I)*exp((47*I)*t)+(630*I)*exp((43*I)*t)

-(630*I)*exp((47*I)*t)+(630*I)*exp((43*I)*t)

(8)

k8 := (630*I)*exp((42*I)*t)+(210*I)*exp((39*I)*t)

(630*I)*exp((42*I)*t)+(210*I)*exp((39*I)*t)

(9)

 

``

k9 := (210*I)*exp((36*I)*t)+(126*I)*exp((35*I)*t)

(210*I)*exp((36*I)*t)+(126*I)*exp((35*I)*t)

(10)

k10 := (126*I)*exp((70*I)*t)+(90*I)*exp((31*I)*t)

(126*I)*exp((70*I)*t)+(90*I)*exp((31*I)*t)

(11)

k11 := -(84*I)*exp((30*I)*t)+(70*I)*exp((27*I)*t)

-(84*I)*exp((30*I)*t)+(70*I)*exp((27*I)*t)

(12)

``

k12 := (90*I)*exp((24*I)*t)-(70*I)*exp((18*I)*t)

(90*I)*exp((24*I)*t)-(70*I)*exp((18*I)*t)

(13)

``

``

k13 := -(126*I)*exp((20*I)*t)-(90*I)*exp((10*I)*t)

-(126*I)*exp((20*I)*t)-(90*I)*exp((10*I)*t)

(14)

check * or + before k14

 

k14 := (210*I)*exp((51*I)*t)+(630*I)*exp((50*I)*t)

(210*I)*exp((51*I)*t)+(630*I)*exp((50*I)*t)

(15)

k15 := (90*I)*exp((59*I)*t)+(126*I)*exp((55*I)*t)

(90*I)*exp((59*I)*t)+(126*I)*exp((55*I)*t)

(16)

k16 := (90*I)*exp((80*I)*t)-(630*I)*exp((40*I)*t)

(90*I)*exp((80*I)*t)-(630*I)*exp((40*I)*t)

(17)

k17 := -(210*I)*exp((39*I)*t)-70*I-945*Pi*exp((45*I)*t)

-(210*I)*exp((39*I)*t)-70*I-945*Pi*exp((45*I)*t)

(18)

``

h1 := h+k1+k2+k3+k4+k5+k6+k7+k8+k9+k10+k11+k12+k13+k14+k15+k16+k17

h-(90*I)*exp((66*I)*t)+(126*I)*exp((70*I)*t)+(90*I)*exp((31*I)*t)-(126*I)*exp((20*I)*t)-(90*I)*exp((10*I)*t)+(210*I)*exp((36*I)*t)+(126*I)*exp((35*I)*t)-(210*I)*exp((54*I)*t)+(84*I)*exp((60*I)*t)-(70*I)*exp((63*I)*t)+(630*I)*exp((42*I)*t)-(1260*I)*exp((40*I)*t)+(90*I)*exp((24*I)*t)-(70*I)*exp((18*I)*t)+(70*I)*exp((27*I)*t)-(84*I)*exp((30*I)*t)-140*I+(90*I)*exp((80*I)*t)-(630*I)*exp((47*I)*t)+(70*I)*exp((90*I)*t)-(70*I)*exp((72*I)*t)+(630*I)*exp((50*I)*t)-(630*I)*exp((48*I)*t)+(630*I)*exp((43*I)*t)

(19)

  plot(Re(h1(t)), t = 0 .. 2*Pi)

 

 

 

 

 

 

``

 

``

``


 

Download plotAnswer.mw

get upset) The rest of the terms also could be covered in the same way for clarity and check for mistakes. The plot obtained is shown for reference. Hope this is useful.

Ramakrishnan V

The answers will be complete and remove brackets from L only if L is assigned as 


 

L := [[TC, DB], [], [TD, JK], [IW, CM], [], [KJ, DJ]]; subs([] = NULL, L)

[[TC, DB], [TD, JK], [IW, CM], [KJ, DJ]]

(1)

L := subs([] = NULL, L)

[[TC, DB], [TD, JK], [IW, CM], [KJ, DJ]]

(2)

L := [[TC, DB], [], [TD, JK], [IW, CM], [], [KJ, DJ]]; remove(`=`, L, [])

[[TC, DB], [TD, JK], [IW, CM], [KJ, DJ]]

(3)

L

[[TC, DB], [], [TD, JK], [IW, CM], [], [KJ, DJ]]

(4)

L := remove(`=`, L, [])

[[TC, DB], [TD, JK], [IW, CM], [KJ, DJ]]

(5)

``Else L will still have brackets in its List.


 

Download Remove_NULL_by_subs.mwRemove_NULL_by_subs.mw

Hope the solution given below by Maple is ok!

Ramakrishnan VSimEquationsSolved.mw
 

"eq1:="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+42*x3-144*x4 = 0

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

(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/2)*x3, x2 = x3, x3 = x3, x4 = (3/2)*x3]]

(5)

NULL Thus it has any number of solutions as you fix a value for x3. There are simple ways to make 

them give unique solution using RHS.

``


 

Download SimEquationsSolved.mw

 

Dear Sir, I checked up with matlab (2017.2) to understand what 'parfar' does. Surprisingly there is no search results for parfar. I have also checked dictionary of matlab under MATLAB operatorss, Built i constants, Built in Functions, MATLAB Commands, Graphics Commands, Programming commands, Simulink commands, and MuPAD commands. This word is not there.

Did you mean: parfor (36 results)

No results for PARFAR.

Suggestions:

  • Make sure all words are spelled correctly.
  • Try different keywords.
  • Try more general keywords.
  • Try fewer keywords.

The above results only pop up. 

However, from what you say, to do faster, loop commands, module and procedure are the best because you make more local variables and hence faster operation results.Just calling the procedure containing the loops with the variable(s) you want these operations is easier and faster than repeatedly doing oops one under the other.

For uses of module and procedure please refer my post on report generation.My_Module_example.mw
 

restartaction1:-Mproc(2)

[4, 4, 8]

(1)

action1:-Mproc(4)

[6, 8, 64]

(2)

with(MathematicalFunctions);
action1:=module ()
        export Mproc,y;
                Mproc:= proc (n)
                        y:=n+2;                
                end proc;
end module()

See EDIT and check the commands under Start Up Code or press just (cntrol +shift +E) keys 3 keys not 6


 

Download My_Module_example.mw

 

Hope this helps.

Ramakrishnan V

Please find my document which may throw light on the solutions given by maple. Maple never ignores anything unless it does not contribute to the answer.

Ramakrishnan v
 

solve(x^3+a*x+2 > 0, [a, x]); [[a = -3, x < 1, -2 < x], [a = -3, 1 < x]]

[[a = -3, x < 1, -2 < x], [a = -3, 1 < x]]

(1)

solve(x^4+2*x+1 > 0, [x])

[[x < -1], [-(1/3)*(17+3*33^(1/2))^(1/3)+(2/3)/(17+3*33^(1/2))^(1/3)+1/3 < x]]

(2)

solve(x^3+a*x+1 > 0, [a, x])

[[a = -(3/2)*2^(1/3), x < (1/2)*2^(2/3), -2^(2/3) < x], [a = -(3/2)*2^(1/3), (1/2)*2^(2/3) < x]]

(3)

solve(-a*x^3+x^4+a*x+1 > 0, [a, x])

[[a < -2*2^(1/2), x < RootOf(_Z^4-a*_Z^3+_Z*a+1, index = real[1])], [a < -2*2^(1/2), x < RootOf(_Z^4-a*_Z^3+_Z*a+1, index = real[3]), RootOf(_Z^4-a*_Z^3+_Z*a+1, index = real[2]) < x], [a < -2*2^(1/2), RootOf(_Z^4-a*_Z^3+_Z*a+1, index = real[4]) < x], [a = -2*2^(1/2), x < -(1/2)*2^(1/2)-(1/2)*6^(1/2)], [a = -2*2^(1/2), x < -(1/2)*2^(1/2)+(1/2)*6^(1/2), -(1/2)*2^(1/2)-(1/2)*6^(1/2) < x], [a = -2*2^(1/2), -(1/2)*2^(1/2)+(1/2)*6^(1/2) < x], [a < 2*2^(1/2), -2*2^(1/2) < a, x = x], [a = 2*2^(1/2), x < (1/2)*2^(1/2)-(1/2)*6^(1/2)], [a = 2*2^(1/2), x < (1/2)*2^(1/2)+(1/2)*6^(1/2), (1/2)*2^(1/2)-(1/2)*6^(1/2) < x], [a = 2*2^(1/2), (1/2)*2^(1/2)+(1/2)*6^(1/2) < x], [2*2^(1/2) < a, x < RootOf(_Z^4-a*_Z^3+_Z*a+1, index = real[1])], [2*2^(1/2) < a, x < RootOf(_Z^4-a*_Z^3+_Z*a+1, index = real[3]), RootOf(_Z^4-a*_Z^3+_Z*a+1, index = real[2]) < x], [2*2^(1/2) < a, RootOf(_Z^4-a*_Z^3+_Z*a+1, index = real[4]) < x]]

(4)

``


 

Download just_a_doc.mw

just_a_doc.mw

1 2 3 4 5 6 Page 3 of 6