Courses First course in numerical methods, struggling

Click For Summary
The discussion centers on the challenges faced by a student in a fast-paced computational physics course that utilizes Scilab for numerical methods. The student has a basic understanding of Python but struggles with translating mathematical concepts into code. They have a solid mathematical background, including courses in linear algebra, calculus, and differential equations. The course covers various topics like nonlinear systems, numerical differentiation, and Monte Carlo simulations.Key points include the importance of understanding the specific programming tasks and mathematical techniques involved. Suggestions for improvement include using pseudocode to outline algorithms before coding, seeking help from instructors or teaching assistants, and utilizing online resources and documentation for Scilab. The student has made progress by attending office hours and consulting MATLAB code online, and they are looking for additional beginner-friendly resources to enhance their understanding of numerical methods, particularly with Scilab or MATLAB examples.
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.
 
TL;DR: Jackson or Zangwill for Electrodynamics? Hi, I want to learn ultrafast optics and I am interested in condensed matter physics, ie using ultrafast optics in condensed matter systems. However, before I get onto ultrafast optics I need to improve my electrodynamics knowledge. Should I study Jackson or Zangwill for Electrodynamics? My level at the moment is Griffiths. Given my interest in ultrafast optics in condensed matter, I am not sure which book is better suited for me. If...

Similar threads

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