Dr. Mostafa Jani

## 35 Reputation

8 years, 89 days
Shahid Beheshti University
Postdoctoral researcher

## Social Networks and Content at Maplesoft.com

Ph.D., Applied Mathematics, Research interests: Numerical analysis, Numerical methods for partial differential equations, Fractional PDEs, Spectral methods, Machine learning, Computational mechanics

## Problem with Simpson method ...

Maple

I think Simpson's rule for integration is very simple and it is just function evaluation over a few points on the interval of integration. So we expect it to be fast.

When I use it as a summation command (using Simpson's formula) it is really fast but when I use the command ApproximateInt with Simpson method it is sometimes really slow. For example

restart;

f := unapply(x^2/(sin(x)+x+1), x);

with(Student[Calculus1]);

evalf(ApproximateInt(f(x), x = 1 .. 2, method = simpson, partition = 20));

or even with partition=10 you must wait for a long time.

Thank you

## Confused with substitution...

Maple

I have a matrix A and a matrix B defined as B:=A. When an entry of B is changed in my Maple code, the matrix A is also changed.

restart:
A := Matrix([1, 1]):
B := A:
B[1, 1] := 2:
print(A):

The result is

[2,1] but as you see, I did not change the entries of A during the code.

This never happen for numbers.

http://tinypic.com/r/5a048l/9

Maple