First course in numerical methods, struggling

Click For Summary

Discussion Overview

The discussion revolves around challenges faced by students in a course on computational physics and numerical methods, particularly focusing on programming in Scilab and the application of numerical techniques to solve mathematical problems. Participants share their backgrounds, course outlines, and seek advice on improving their programming skills and understanding of numerical methods.

Discussion Character

  • Exploratory
  • Technical explanation
  • Homework-related
  • Debate/contested

Main Points Raised

  • One participant expresses difficulty in translating mathematical problems into code, despite having a solid math background.
  • Another participant suggests using pseudocode to outline algorithms before coding, which may help in understanding the syntax of Scilab.
  • A participant shares their experience of improvement through office hours and online resources, indicating that external help can be beneficial.
  • Concerns are raised about the fast-paced nature of the course and its impact on learning programming effectively.
  • One participant questions whether a similar course on Numerical Methods and Linear Algebra would be appropriate given their lack of programming experience.
  • Another participant mentions struggling with specific numerical methods, such as Aitken's D2 acceleration, and seeks recommendations for beginner-friendly texts that include examples in Scilab or MATLAB.

Areas of Agreement / Disagreement

Participants generally agree on the challenges of learning programming in a fast-paced course, but there are varying opinions on the best approaches to overcome these challenges, such as the use of pseudocode or seeking help from instructors. No consensus exists on the best resources or methods for learning.

Contextual Notes

Participants have varying levels of mathematical maturity and programming experience, which may influence their perspectives on the course material and the programming language used. The discussion highlights the importance of context in learning environments and the specific focus of the course.

Who May Find This Useful

Students enrolled in computational physics or numerical methods courses, particularly those with limited programming experience or those transitioning to new programming languages like Scilab.

Lavabug
Messages
858
Reaction score
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
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.
 
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.
 
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.
 
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.
 
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.
 

Similar threads

  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K