Week 1: F (X) Sin (KX) and G (X) Exp X

You might also like

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

Numerical Methods : Homeworks

2019-1 Robert Salazar


Ph.D. in Physics

Week 1
Let us consider the following functions
x
g(x) = exp .− Σ
f (x) = sin(kx) and
2
where k is a constant plot f (x), g(x) and the product f (x)g(x). Your output setting k = 5 in 0 < x < 4π should
be as the one shown in Fig. 1.
1 1

0.8
0.5

f(x)=exp(-x/2)
g(x)=sin(kx)

0.6
0
0.4

-0.5
0.2

0
0 2 4 6 8 10 12 14 -1
0 2 4 6 8 10 12 14
x
x

1
f(x)g(x)=exp(-x/2)sin(kx)

0.5

-0.5

-1
0 2 4 6 8 10 12 14
x

Figure 1: Fig 1. output 1

You might also like