Professional Documents
Culture Documents
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);
% 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
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
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
4. Question
a)
b)
Given electric field components represent plane waves, direction of propagation, is along the
y-axis.
c)