Ramakrishnan

Ramakrishnan Vaidyanathan

319 Reputation

12 Badges

5 years, 203 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 answers submitted by Ramakrishnan

Select Text from the context bar avove. Type anything subscript and superscript.
Select subscript. Select superscript using left mouse click drag. Select Format. Hover over popout menu first item Character. Hover over second popup menu fourth item Superscript and left click to select it. You are done.
Again go to format Character and deselect the clicked item and begin to get normal character.
Hope this clarifies to an extent getting superscript and subscript. Cntrl plus u gets u underline the word. This also can be done by the above method. Many such character formats can be done like this.

Cheers.

Ramki
 

``

Select Yext from the context bar avove. Type anything subscript and superscript.

Select subscript. Select superscript using left mouse click drag. Select Format. Hover over popout menu first item Character. Hover over second popup menu fourth item Superscript and left click to select it. You are done.

Again go to format Character and deselect the clicked item and begin to get normal character.


 

Download subscriptlearning.mw

I just use copy and insert rows in the table. Once you make atleast one table, then you can use it as a template and add columns to the left or right by copy paste and cancel and insert selections in that order.

Select, copy, paste, cancel delete dialogue, insert dialogue appears, select insert and you are done.
 

``

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

``

``


 

Download textTable.mw

Cheers.

Ramki

Hope the enclosed doc covers all possible problems with answers.


 

restart

f := proc (x) options operator, arrow; piecewise(x <= 0, -3, 0 < x and x <= 1, x^2, 1 < x, -x) end proc

proc (x) options operator, arrow; piecewise(x <= 0, -3, 0 < x and x <= 1, x^2, 1 < x, -x) end proc

(1)

f(-1) = -3NULL

f(1/2) = 1/4NULL

f(4) = -4NULL

Inverse relation required by the OP

 

a

x

x; f(x) > a

a < -3

a < -3

(2)

``

x; x = RealRange(Open(-infinity), 0)

x = RealRange(-infinity, 0)

(3)

-3

"<=0" or 3

x; 0 < x and x < 3

a < 0, a <> -3

x = abs(a)

x; x < abs(a)

0 <= a and a <= 1

sqrt(x)

x; sqrt(a) < x and x < 1

1 > a, a <> -3

a

x*is*undefined

 

 

Procedure defined here

xValue := proc (a) local x, x1; if a < -3 then x := "x:x=(-&infin;,0] " elif a = -3 then x := "x:0<x<3" elif -3 < a and a < 0 then x1 := abs(a); x := ["x1=", x1, "x:x<x1"] elif 0 <= a and a < 1 then x1 := sqrt(a); x := ["x1=", x1, " x: x1<x&le;1"] elif 1 <= a then x := "undefined" end if end proc

xValue(4)

"undefined"

(4)

NULL

xValue(-3)

"x:0<x<3"

(5)

xValue(0.9e-1)

["x1=", .3000000000, " x: x1<x&le;1"]

(6)

x1

x1

(7)

``


 

Download piecewiseFunctionSolution.mw

Cheers.

Ramki

The given problem has domain {R}, but Range is (-inf, 1].

having known this, the problem can be stated R: f(x)>a, a: (-inf, 1] and solved.

for i from -1 by 0.5 to 2 do
 if   f(i)-a>0 then answer:=i;
end do

A crude program to convey my idea is enclosed.

Cheers.

Ramki
 

restart

f := proc (x) options operator, arrow; piecewise(x <= 0, -3, 0 < x and x <= 1, x^2, 1 < x, -x) end proc

proc (x) options operator, arrow; piecewise(x <= 0, -3, 0 < x and x <= 1, x^2, 1 < x, -x) end proc

(1)

f(-1) = -3NULL

f(1/2) = 1/4NULL

f(4) = -4NULL

To find R: f(x)>3

f(x)-3 should be >0

f(0)-3

-6

(2)

f(7)-3

-10

(3)

f(.2)

0.4e-1

(4)

``

for i from -1 by .5 to 2 do f(i) end do

-2.0

(5)

The domain for the problem is {R} and the Range is (-∞,1]

for i by -0.5e-1 to -1 do f(i)-1 end do


NULL 


 

Download piecewiseFunction.mw

 I am not an expert in squarefree ploynomial. However, I thought the doc I have made for nth root of a polynomial and its derivatives may be of use to you. First few lines of doc are of not importance here. Hope the rest of the algorithm will be of use. Cheers.

Ramki
 

eval(root(x^3, 3))

(x^3)^(1/3)

(1)

(x^3)^(1/3)

(x^3)^(1/3)

(2)

(-8.0)^(1/3); root(-8.0, 3); surd(-8.0, 3);

1.000000000+1.732050807*I

 

1.000000000+1.732050807*I

 

-2.000000000

(3)

(-8)^(1/3)

(-8)^(1/3)

(4)

(1+1.732*I)^3

-7.999472+0.304832e-3*I

(5)

root(-8, 3)

2*(-1)^(1/3)

(6)

surd(-8, 3)

-2

(7)

surd(x^3, 3)

surd(x^3, 3)

(8)

root(x^3, 3)

(x^3)^(1/3)

(9)

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

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

(10)

y(2)

4

(11)

y := x, proc (lambda) options operator, arrow; x^6+(2*lambda+1)*x^3+2 end proc

x, proc (lambda) options operator, arrow; x^6+(2*lambda+1)*x^3+2 end proc

(12)

root[3](x^6+(2*lambda+1)*x^3+2, symbolic)``

(x^6+2*lambda*x^3+x^3+2)^(1/3)

(13)

diff(x^6+(2*lambda+1)*x^3+2, x)

6*x^5+3*(2*lambda+1)*x^2

(14)

root[3](6*x^5+(3*(2*lambda+1))*x^2, symbolic)

(6*x^5+6*lambda*x^2+3*x^2)^(1/3)

(15)

diff(6*x^5+6*lambda*x^2+3*x^2, x)

30*x^4+12*lambda*x+6*x

(16)

root[3](30*x^4+12*lambda*x+6*x, symbolic)

(30*x^4+12*lambda*x+6*x)^(1/3)

(17)

diff(30*x^4+12*lambda*x+6*x, x)

120*x^3+12*lambda+6

(18)

root[3](120*x^3+12*lambda+6, symbolic)

(120*x^3+12*lambda+6)^(1/3)

(19)

diff(120*x^3+12*lambda, x)

360*x^2

(20)

root[3](360*x^2, symbolic)

2*45^(1/3)*(x^2)^(1/3)

(21)

diff(360*x^2, x)

720*x

(22)

root[3](720*x, symbolic)

2*90^(1/3)*x^(1/3)

(23)

diff(720*x, x)

720

(24)

``

root[3](720)

2*90^(1/3)

(25)

``


 

Download RootsOfPolynomial.mw

Dear member,

A maple student version, if availbale, will be more useful for a student to learn right from basics to advanced studies in a PhD programme. All this with an understanding of what you do and what maths does and how it looks to your eyse as a visualization of the happenings in maths?

A simple example of domain and range in a function can be visualised as a vending machine letting you icecream bars for the coins from your purse.

The transformation of a simple parent function moving in space and stretching its size by simple parameters involved in a function. A great place to learn maths in maple in my opinion.

Ramki

Dear friend, The expression 

((√1 + y′ ² )/dy')

cannot be solved. Only equations can be solved. Softwares normally solve an expression by equating the expression to zero. If that is the way you want, yes maple can solve it.

((√1 + y′ ² )/dy') = 0 -> √1 + y′ ²  = 0  -> 1 + y′ ²  = 0 -> y′ ²= -1 ->  y′ =  i -> dy = i dx -> y = i x²/2

Cheers. 

Ramakrishnan V


Dear Sir, The plot starts for x value zero correspondingly, the y value (integral is infinity).

There is a distinct difference from 0.0001 and 0.00001 and correspondingly the y values are finite and infinite as can be seen from the maple evluated values corresponding to x values. An appropriate x values clearly indicate this. Change the x limits to 0.0001 to 0.00015 and you will see the plotted values clearly.

Your third execution of procedure gives the integral values for a given x and y value, whereas the plot is for an entire range of x values from zero to 0.00015. Corresponding plot  shows y value from infinity (asymptote can be drawn) to close to zero.

Hope the explanation is clear and satisfactory.

Ramakrishnan V.

restart; with(plots); with(ScientificConstants)

g := GetValue(Constant(g))

9.80665

(1)

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.956284552

(2)

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

4.829201862

(3)

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

Float(infinity)

(4)

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^(-3) .. 1.5*10^(-3))

 

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

5.835168515

 

0.2e-3

(5)

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

 

 

Float(infinity)

 

0.4e-4

(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))))

Float(infinity)

(7)

``


 

Download Int_Question_answer.mw

Please permit me to explain a little I know about the Newton's method of solving equations. The solutions or Roots of an equation are zero values of the expression. (Ex: 2x = 3 is an equation (bring all terms to left hand side) , then 2x-3 is the expression and the root or zero value or solution of the equation is x = - 3/2).

If you plot the expression, it will either cut the (real number line) x axis or not. You will get chaotic in the later case because there is no solution.

In case of an expression that has a zero value (i.e. solution), if you plot the expression, then the slope at any point tend to point towards the (x axis) real line closer to the zero value (in real line, f(x) = 0 at that x value)

A closer look at the curve (what ever function be it) will tell you that at any point (value of x you take as an initial value, f(x) is an opposite side (from zero point) and slope is opposite side by adjacent side. Remember that slope is nothing but tan =  df(x)/dx.Hence (f(x)/tan = ), Reciprocal of secant (i.e. adjacent length to reach zero value from current initial value) directly gives the interval.

The interval keeps reducing with subsequent calculations.

Here a is initial value, ab is adjacent length, b is the new x value closer to zero value and r is the zero value. 

Therefore b = a - [f(a)/f'(a)]       [Note secant line is f(a)/f'(a) = ab]

If your initial assumption for x0 (solution) is closer to r (zero value), it will be very simple and quick for manual calculations. For computer, it is immaterial and takes extra few milliseconds!!.

Hope I have not confused you.

Cheers. Ramakrishnan V

Mathematics does it automatically only  the way you wanted.


 

restart
` Let z be the result nx`^n

nx := -1; n := 2

2

(1)

z := evalf(nx^n)``

1.

(2)

``

r  For even n, z = 1

 

n := 3; z := evalf(nx^n)

-1.

(3)

nx

-1

(4)

r  For odd n, z = nx

 

nx := 1; n := 2

2

(5)

z := evalf(nx^n)

1.

(6)

r  For even n, z = 1

n := 3; z := evalf(nx^n)

1.``

(7)

r  For odd n, z = nx

 Hence,  the expression nx^n,= 1 for n even and nx^n,= nx for n odd.

There is no need to specify nx = +1 or -1. For both (signs), nx = +1 and nx = -1, the

results are as required in your statement.

Cheers.

``


 

Download PowerOfIntegers.mw

In my opinion, it acts like a procedure statement

As you have stated,PDEtools[declare](y(t)) tells Maple that y is a function of t, and therefore y(t) is displayed as y and the derivative of y is displayed as yt.

The procedure p(s) tells Maple that p is a function of s, and therefore p(s) is displayed as p and the derivative of p is displayed as ps.

Hope I am clear

Cheers.

Ramakrishnan V

For evn values of n, straight away the result can be taken as the fixed value 1.

For odd values of n, nx^n,= nx by nature since nx = +1 or -1 only.

For evn values of n, nx^n = 1 by nature since -1^odd is -1 and +1^odd is +1 and nx = +1 and -1 only

The problem as I understand is simple and as follows.

In MATLAB the solution is

n = [1 2 3 4];
nx = [1 -1];
z = [nx(1).^n;nx(2).^n];

z =

     1     1     1     1  (for nx = 1)
    -1     1    -1     1  (for nx = -1)

The first row gives all answers as 1 ^ any number is 1.

The second row gives -1 ^odd number is -1 and -1 ^ even number is even 

Hope I have not mistaken the problem.

Much easier commands must be available in Maple for this matlab solution.

Cheers.

Ramakrishnan V

@wsningrat 

Though I am a novice in this area, I just thought giving my idea would sometimes lead you to a solution.

In matlab, when you have all the solutions, both wanted (negative) and unwanted (positive), there is a quick way to discard unwanted elements and retain the remaining elements.

The commands used are logical (indexing) operation and conditional operations.

First select all the elements that are negative and index them.

Example: Let z = {(x,y)}be [[1, +0.5], [3, +0.8], [4, -0.8],[5, +0.4],[6, -0.3]]

Indexing is here z(:,2)<0; i.e. z(3) and z(5). Now idx = (3,5) are indexes.

(: referes to all rows; 2 refers to 2nd column in all rows (+ and -ve values here)

The solution is z(~idx) . Nonindexed z values are the required solution.

(Here ~ refers to not condition and  idx refers to indexed values)

There must be a way to do this in MAPLE as well.

Cheers.

Ramakrishnan V

Dear Sir,

Hope attached doc helps you in some way for solution.

printf format as given below is used to produce the print out.
printf("\n             Report on  %5.55s    %d", l, m);
 

restart; l := "Value"; m := 9

"Value"

(1)

printf("\n                     Report on  %5.55s    %d", l, m)


                     Report on  Value    9

 

``

tot := 0:

for i from 11 by 2 while i < 100 do
m:= m+5;
   tot := tot + i;
printf("\n                     Report on  %5.55s    %d", l, m);
end do:
tot;


                     Report on  Value    14
                     Report on  Value    19
                     Report on  Value    24
                     Report on  Value    29
                     Report on  Value    34
                     Report on  Value    39
                     Report on  Value    44
                     Report on  Value    49
                     Report on  Value    54
                     Report on  Value    59
                     Report on  Value    64
                     Report on  Value    69
                     Report on  Value    74
                     Report on  Value    79
                     Report on  Value    84
                     Report on  Value    89
                     Report on  Value    94
                     Report on  Value    99
                     Report on  Value    104
                     Report on  Value    109
                     Report on  Value    114
                     Report on  Value    119
                     Report on  Value    124
                     Report on  Value    129
                     Report on  Value    134
                     Report on  Value    139
                     Report on  Value    144
                     Report on  Value    149
                     Report on  Value    154
                     Report on  Value    159
                     Report on  Value    164
                     Report on  Value    169
                     Report on  Value    174
                     Report on  Value    179
                     Report on  Value    184
                     Report on  Value    189
                     Report on  Value    194
                     Report on  Value    199
                     Report on  Value    204
                     Report on  Value    209
                     Report on  Value    214
                     Report on  Value    219
                     Report on  Value    224
                     Report on  Value    229
                     Report on  Value    234

 

2475

(2)

``


 

Download printValues_whileLoop.mw

printValues_whileLoop.mw

Cheers. Ramakrishnan V

Please find attached document following the order of commands.

y = ax+b is the format in first line

x,y data are given in second line. (The data you give as (xn, xn+1){ which exercise you can do yourself from the given x values, arranging it in ascending order first)

Command for curve fitting in third line

Print the equation command in fourth line

Plot the graph of the line in fifth command

You can also plot your given values in the plot and compare!

Thanks to Dr.Robert J Lopez who taught me this and Maplesoft.

Cheers.

Ramakrishnan V
 

y := a*x+b; d := [[3, 4], [5, 6], [6, 8], [8, 10]]; c := CurveFitting[LeastSquares](d, x, curve = y); Printf(c)

Printf(3/13+(16/13)*x)

(1)

plot(c, x = 0 .. 10)

 

``


 

Download Fix_plot_stLineData.mw

1 2 3 4 5 6 Page 1 of 6