Computational Methods Lab 1: Introductory Questions: March 5, 2021

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Computational Methods

Lab 1: introductory questions

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 )

You might also like