Dear @tomleslie, you are right. The Maple numeric method is more accurate than my method.

What are the simple methods for finding maximum relative error, and max. absolute error at the interval?

Dear @Carl Love, thanks for your feedback.

1- You are right, I corrected the post.

2- I removed local variable K.

3- Yes, it must be "*". I corrected it, too.

4- **phii** is not an external procedure. I corrected it as you say. ( **phi[n, m+s-2*j](t) )**

I think the multiplication is commutative and also the **matrix ** is a symmetric matrix.

Dear @tomleslie, thanks for your interest.

I think I am a misunderstanding. So, I edited the question.

After finding matrices by hand, we can write maple code for the matrices like you (Thanks again). But I want to find the matrices M,C,K etc. from the directly from the following equation by Maple.