Professional Documents
Culture Documents
Computational Methods Lab 1: Introductory Questions: March 5, 2021
Computational Methods Lab 1: Introductory Questions: March 5, 2021
Computational Methods Lab 1: Introductory Questions: March 5, 2021
March 5, 2021
1 Question 1
Given function f : R2 → R
f (x, y) = sin(x) + y 2
calculate ∇f
2 Question 2
Using only mass, velocity and force write vector equation expressing New-
tos’s second equation of dynamics.
3 Question 3
What value will be printed by the last line of the following program:
n = 5;
q = 2.0;
a = 1.0;
s = 0.0;
w h i l e ( n >=0)
s = s+a ;
a = a * q;
n==;
end
disp ( s )