First course in numerical methods, struggling

In summary: If you do this, it just becomes a matter of using the correct syntax. You may want to peruse the mathsci documentation to see if there is a "getting started with the language" manual.In summary, Lavabug suggests that if you lack programming experience, focus on learning the basics of the language first. He also suggests finding help from instructors or tutors, and perusing the mathsci documentation for help. He advises that if you are struggling to translate a math problem into code, to try using pseudocode to write out the algorithm first.
  • #1
Lavabug
866
37
I'm currently taking a course in computational physics/numerical methods. My only background in programming is very basic self-learned python (loops and not much else). We use scilab in this course and will be solving nonlinear systems of equations, numerically solving for the roots of an equation, plotting uncertainties. The course is very fast-paced and most of my classmates are in a similar situation. Any general tips on getting up to speed in a programming language if one has the elementary basics of python down? I was looking forward to this course to get some real scientific programming experience but I wasn't expecting it to be this fast paced.
 
Physics news on Phys.org
  • #2
Lavabug said:
I'm currently taking a course in computational physics/numerical methods. My only background in programming is very basic self-learned python (loops and not much else). We use scilab in this course and will be solving nonlinear systems of equations, numerically solving for the roots of an equation, plotting uncertainties. The course is very fast-paced and most of my classmates are in a similar situation. Any general tips on getting up to speed in a programming language if one has the elementary basics of python down? I was looking forward to this course to get some real scientific programming experience but I wasn't expecting it to be this fast paced.

Hey Lavabug.

It might help the members here if you tell us what kind of stuff you are dealing specifically and what language/packages/libraries you are using. Also it would help us to have a background of any math courses you have taken as well as your general mathematical maturity.

It would also be useful for us to know the context of your learning environment: that is how you are doing the course (part of a degree/community college diploma) as well as a summary of the focus of the course.

Generally the focus will help determine many answers to your questions: for example if you are focusing on mathematical techniques and understanding/implementation of those techniques then the programming part of the course is more or less not going to be as important as the rest of the material.

If you gave us some of these answers, I am sure that we will be able to give more specific answers to your questions.
 
  • #3
We're using scilab, which is an open-source "clone" of MATLAB or so I am told. This is a 3rd year undergraduate physics course at my university.

My math background includes: courses in linear algebra, calculus/analysis, multivariable/vector calc, ODEs, complex analysis, Fourier series, integral transforms and PDE's.

The course outline looks like this: systems of equations(point iterations, Newton's method), quadrature & numeric differentiation(interpolation, gaussian quadrature...), integration of DE's: boundary and initial value problems (multi-step method, finite difference...), eigenvalues (power, Jacobi, Hyman, and QR methods), probability & simulations (Monte Carlo method).

For example, in my first class we wrote codes to solve for the roots of cosx*coshx + 1 numerically and the golden ratio to a certain degree of precision using a while loop, among other things.

The scilab syntax seems easy enough, I know how to handle matrices/arrays and operate with them but I'm struggling with translating a math problem into a code. It's as if my math knowledge becomes irrelevant.
 
  • #4
Lavabug said:
The scilab syntax seems easy enough, I know how to handle matrices/arrays and operate with them but I'm struggling with translating a math problem into a code. It's as if my math knowledge becomes irrelevant.

Are you using pseudocode to write out the algorithm for solving the problem before trying to code it? If you do this, it just becomes a matter of using the correct syntax. You may want to peruse the mathsci documentation to see if there is a "getting started with the language" manual.

Sometimes, if you aren't very familiar with a lot of the constructs of a language, you may not always code things in the most efficient way. That being said, if you get something that works, you can always try to go back and make it more efficient as your knowledge of the language grows. Between PF and your instructor/TA, it should be no problem to ask for help coding things.
 
  • #5
I kinda in the same situation. I signed up for Numerical Methods And Linear Algebra this summer, is this kinda the same class? I have no programming experience but have self taught the beginnings of linear algebra, should I not take this class?

Description:
MATH 2890 - Numerical Methods And Linear Algebra
Topics include: matrices, characteristic roots, solution of linear and nonlinear equations, curve fitting, integration, differentiation and numerical solution of ordinary differential equations. MATLAB is introduced and used to analyze problems.
 
  • #6
I'm happy to report that since I made this thread, I've advanced quite a lot. Seeing the prof during office hours + MATLAB code on the internet are helping substantially.

bromden said:
Are you using pseudocode to write out the algorithm for solving the problem before trying to code it? If you do this, it just becomes a matter of using the correct syntax.

I try to do that, I picked that up from fiddling with Labview in one of my lab courses.

I'm having some trouble translating expressions like point-iteration methods like Aitken's D2 acceleration, I don't see how they're supposed to work. But I picked up the numerical analysis reference text recommended by my prof and it looks like it'll be helpful. It's Schwarz's "Numerical Analysis: Comprehensive Introduction". If anyone could suggest an even more novice-friendly text to complement my understanding of the methods my course will cover(preferably with scilab/matlab examples), I'd appreciate it.
 

FAQ: First course in numerical methods, struggling

1. What is a first course in numerical methods?

A first course in numerical methods is an introductory course that teaches students how to use numerical techniques to solve mathematical problems. These methods involve using algorithms and computer programs to approximate solutions to equations or systems of equations.

2. Why do students often struggle with this course?

Students may struggle with a first course in numerical methods because it requires a strong understanding of mathematical concepts, as well as programming skills. The subject can also be challenging because there are multiple methods and algorithms to learn, and it can be difficult to know which one to use for a specific problem.

3. Are there any prerequisites for taking a first course in numerical methods?

Typically, a first course in numerical methods requires a strong foundation in calculus, linear algebra, and computer programming. Some courses may also require knowledge of differential equations.

4. What are some common topics covered in a first course in numerical methods?

Some common topics covered in a first course in numerical methods include solving equations and systems of equations, interpolation and approximation, numerical integration and differentiation, and solving differential equations. Students may also learn about error analysis and how to choose the appropriate method for a given problem.

5. How can I succeed in a first course in numerical methods?

To succeed in a first course in numerical methods, it is important to have a solid understanding of the underlying mathematical concepts and to practice using different methods and algorithms. It can also be helpful to seek out additional resources, such as textbooks or online tutorials, and to attend office hours or seek assistance from a tutor if needed.

Similar threads

Replies
12
Views
2K
Replies
5
Views
1K
Replies
1
Views
1K
Replies
7
Views
2K
Replies
1
Views
2K
Replies
1
Views
2K
Replies
4
Views
2K
Replies
8
Views
3K
Replies
1
Views
1K
Back
Top