## Ramakrishnan

Ramakrishnan Vaidyanathan

## 399 Reputation

10 years, 236 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.

## solve an expression...

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

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.

 >
 >
 (1)
 >
 >
 (2)
 >
 (3)
 >
 (4)
 >
 >
 (5)
 >

 (6)
 >
 (7)
 >

## guess vector in fsolve...

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

## Power of Integers - Simple Answer...

Mathematics does it automatically only  the way you wanted.

 (1)

 (2)

r  For even n, z = 1

 (3)

 (4)

r  For odd n, z = nx

 (5)

 (6)

r  For even n, z = 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.

## PDEtools[declare](y(t))...

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

## power of integers...

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

## How to assume only negative values...

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

## My simple Loop for Printing in while Loo...

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

 (1)

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

printValues_whileLoop.mw

Cheers. Ramakrishnan V

## DefineEquationGiveDataandtheCommand_Plot...

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

 (1)

## Is the for..do loop in my procedure caus...

There is no mistake in the for loop;

Only in the procedure the statement " uses RonanRoutines" is a mistake.

Further your programme works in the first instance only; second time it does not work for this error statement.

There is no match for this "RonanRoutines" word in the help section also.

nops(soll) remains 4 and the for loop executes 4 times as well.

Hope I may be of some use.

 (1)

 (2)

 (3)

 (4)

 (5)

 (6)

 (7)

 (8)

 (9)

This I can't get to work. All 4 sections of the pedal curve are the same and should not be.

 (10)

 (11)

 (12)

Cheers.

Ramakrishnan V

## polar plots...

restart is very important

The maple commands recommended will work in a fresh document, otherwise  (or unassign r and theta, may be, but I have not used) restart command is essential.

I enclose the doc which works fine, but does not work second time if restart is removed (even) from the first line. It is theredore very important to use restart in the beginning of any document.

I have used the same first commands group three times. Second time wihout restart and third time with restart. Second time it gives error, but third one, it answers.

It is theredore very important to use restart even at places (as required)  in the middle of any document.

Note: To get the the animation,  click on the plot to get the animation menu and then select press play icon.

Cheers.

Ramakrishnan V

## You have got it correctly...

Dear user,

You have got the answer in the first line itself. The only oversight is the correct bracket curly one for the list and not square bracket as shown in your question. Commands and doc attached below for reference. I must mention Dr.Robert Lopez taught me this (types of brackets for specific uses).

To get the answer, assign a:=; a[1] gives you [1,2].
Cheers.

Ramakrishnan V

 (1)

IntersectExample.mw

## polynomialFit and Plotting a graph...

Dear user,

First, define the polynomial (curve) format as y = an x^n+....+constant.

Next, give a list as d = [[2,2],[12,6]....]

Then use the package command here, c = CurveFitting[LeastSquare](d,x,curve = curveformat)

Thats all. You get the resulting equation.

 (1)

I learnt this from Prof.Dr.Robert Lopez. Thanks Professor.

Cheers.

Ramakrishnan V

## Four unknowns and Five Equations?...

Four equations and four unknowns gives you the answers as given below which includes in third solution,  the simple answer you suggested..

Four equations and Five equations gives you more answers including the particular solution when a > 0, d = 0. Hence when a > 0, d is not {R-0}.

 (1)

 (2)

Ramakrishnan V

mapleprime10102018.mw