You are on page 1of 9

Homework-1

BYM506E- Electromagnetic Waves in Medicine


İrem Nur Altıntaş
Biomedical Engineering, Istanbul Technical University
altintas24@itu.edu.tr

1. Question
1
Solve the equation u xx − 2
U tt =0 ; x ∈ (−∞ ; ∞ ) ,t ∈ [ 0 ; ∞ ) . The initial conditions are;
c
2
−x
u ( x , 0 )=ⅇ
∂u
( x ,0 )=0
∂t
MATLAB Code Solution

% Initialize constants
c = 1; % Speed of wave propagation
x_min = -5;
x_max = 5;
x_values = linspace(x_min, x_max, 400); % x values for plotting

% Define functions
u_initial = @(x) exp(-x.^2);
left_moving_component = @(x, t, c) u_initial(x + c * t);
right_moving_component = @(x, t, c) u_initial(x - c * t);
d_alembert_solution = @(x, t, c) left_moving_component(x, t, c) +
right_moving_component(x, t, c);

% Set time points for plotting


time_points = [0, 1, 2]; % Define your time points for plotting

% Plotting loop
for idx = 1:length(time_points)
t = time_points(idx);
figure; % Create a new figure for each time point
% Plot left moving component for x_values at t
plot(x_values, left_moving_component(x_values, t, c), '-r');
hold on;
% Plot right moving component for x_values at t
plot(x_values, right_moving_component(x_values, t, c), '-b');
% Plot combined d_alembert_solution for x_values at t
plot(x_values, d_alembert_solution(x_values, t, c), '-g');
hold off;
% Mark specific points on the combined solution

% Finalize plot
xlabel('x');
ylabel('u(x, t)');
legend( 'D''Alembert Solution');
title(['t = ', num2str(t)]);
grid on;
end
Fig.1 Visualization of d’Alembert’s solution to the one-dimensional wave equation.
The figure shows three subplots corresponding to time points t = 0, t = 1, and t = 2.
2. Question

a) u ( x , y , t ) =sin ( x−2 t ) cos ( 3 y−t )


To verify if the function u(x, y, t) satisfies this wave equation, we compute the second partial
derivatives concerning t, x, and y. The relevant second derivatives are listed below;

As can be seen derivatives are not equal thus, the given function u(x, y, t) does not satisfy the
standard two-dimensional wave equation.

−2 x x
b) u(x , t)=e sin(3t )+ sin( )cos (3 t)
3
To determine if u(x, t) satisfies the standard form of the wave equation in two dimensions,
given by
2
2 1 ∂u
∇ u= 2 2
v ∂t

To verify if the function u(x, t) satisfies this wave equation, we compute the second partial
derivatives concerning x and t. The relevant second derivatives are listed below;

Therefore, it can be inferred that the function u(x,t) does not satisfy to the wave equation.

−2 x
c) u ( x , y , z , t )=e cos ( t−x2 + 2 y )+e 2 x−z
sin (−3 z + y−t ) where x, y, and z are the

spatial variables and t is the time variable.


To determine if u(x, y, z, t) satisfies the standard form of the wave equation in three
spatial dimensions, given by

2
2 1 ∂u
∇ u= 2 2
v ∂t
This shows that the function u(x,y,z,t) does not meet the requirements of the wave equation.
3. Question,
a. u(x , y)=( 2i−3 ) ei (x+2 y) cos ( y)

Find the time-domain representation of the wave and its properties such as
wavenumber,speed, magnitude, and propagation direction.
k vector=( k x , k y )=( 1 , 2 ) , k number=√ 5 , magnitude of the wave : √ 13

b. Given function u ( x , y , z )=sin ( x ) e i (3 x+2 y−4 z) , f =100 MHz


k vector=( k x , k y , k z ) =( 3 , 2,−4 ) , k number=√ 29 ,magnitude of the wave : A=1

c. Given function u( x , y , z )=i cos ( x ) e 2 x−3 z −sin( x +3 y )


k vector=( k x , k y , k z ) =( 2 , 0 ,−3 ) , k number=√ 13 , magnitude of the wave : A=1

4. Question
a)
b)

Given electric field components represent plane waves, direction of propagation, is along the
y-axis.
c)

You might also like