## 25 Reputation

16 years, 345 days

## epsilon...

Could it be that you are using $\epsilon$ in 2 contexts. In the first half, it is a constant. Then you give assignments such as $\epsilon[1]$ where the constant $\epsilon$ also show up?

## continuous function with imaginary units...

The following should help cleaning all imaginary units from the integral:

int(f^2, x);

simplify(Re(%)), assuming x > 0;

evalc(%)

You may then evaluate the integral.

As a check, you may find

Im(int(f^2,x)) assuming x>0

which gives the answer 0 showing that there is no "imaginary" part in the integral.

## typo...

In the calculation of II, you wrote "evlaf" rather than "evalf".

## animating a growing sphere...

with(plots);
sph := k->animate(implicitplot3d, [x^2+y^2+z^2 = r^2, x = -k .. k, y = -k .. k, z = -k .. k], r = 0 .. k):
sph(2);

If you work in spherical coordinates, you could use the easier plot3d command:

sphs := k-> animate(plot3d, [r, u = 0 .. 2*Pi, v = 0 .. 2*Pi, coords = spherical], r = 1 .. k):

## It's an ellipse...

It is an ellipse, but with the 2 axes almost equal in length. Play with the parameter and you will see an ellipse.

## using surd...

You can use the function surd: plot(surd(x,3),x=-4..4).

Quoting from the help page:

In particular, if n is odd then if x>=0 then surd(x,n) = x^(1/n) and if x<0 then surd(x,n) = -(-x)^(1/n)

## Max Min Inflexion...

Just like you do without Maple.

1. If the function contains asymptotes (horizontal), you should verify their values by finding limits. Vertical asymptotes will be the most difficult to find. If your function is rational, they are the values for which the denominator is 0 (unless of course ...). If it is not rational, the real trouble begins. This is the most difficult part.

2. Derive the function twice (name both, for example Fp and Fs)

3. Find the solutions to Fp=0 and Fs=0. I call the results mm (for min and max) and pinfl for point of inflection.

3. Verify if the different values in mm give minimum or maximum or neither. First use the second derivative test. If it doesn't work, you'll have to test them in another way; this is probably the second most difficult part.

4. Same as 3 for the points in pinfl.

5. Find the values the function takes at all points you have found.

6. Make a graph of the function to see if the graph and the values you found are in agreement.

I've never implemented a procedure like this because of steps 1 and 4. I usually do each of these steps by taking the decisions myself rather than putting them in a procedure with many if constructs.

## Approximating an integral with Simpson's...

I think there are three difficulties in your approach.

1. a doesn't have a value.

2. Your function has a lot of discontinuities in the interval -100..100. These discontinuities will hinder your calculations.

3. Also,  does not exist.

 Page 1 of 1
﻿