dy/dt+c(dy/dx)=0, y=cos(x), t=0, dy/dt=csin(x),t=0 has a solution y=cos(x−ct).

samuelaplc

samuelaplc

Answered question

2022-10-07

y t + c y x = 0 ,
y = c o s ( x ) , t = 0 ,
y t = c s i n ( x ) , t = 0
has a solution
y = c o s ( x c t ) .
I wanted to expand both the derivatives as centeblack differences. So, in order to expand my derivatives, I did as shown below;
y ( i + 1 ) y ( i 1 ) 2 Δ t + c ( y ( i + 1 ) y ( i 1 ) 2 Δ x ) = 0
y Δ t + c ( y Δ x ) = 0
Now, I also intend to prove that the algebraic solution is an exact solution of the difference formula if I choose Δ x = c Δ t. How do I achieve this goal?

Answer & Explanation

Jane Reese

Jane Reese

Beginner2022-10-08Added 8 answers

Your time-discretization in your update to your post is not right. Please note how I have indicated it in the comment above - there are 2 indices, one (subscript i) indicates the x dimension and the other (superscript n) indicates the time dimension. Your teacher should have taught you this. Anyway, look at equation 29 on this linked doc. For this problem, you don't even need to think about indexes, just that you are representing y ( t , x ) x as y ( t , x + Δ x ) y ( t , x Δ x ) 2 Δ x . Similarly for y ( t , x ) t in terms of Δ t

Now, to show the y = cos ( x c t ) satisfies the equation when the "grid speed" Δ x Δ t equals the wave speed c, just plug in y = cos ( x c t ) into the discretized equation you just created.

You will need the trigonometric identity
cos ( x ) cos ( y ) = 2 sin ( x + y 2 ) sin ( x y 2 )
And indeed, when grid speed equals wave speed, the LHS of the discretized equation, then evaluates to zero, which is the RHS.

Do you have a similar question?

Recalculate according to your conditions!

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?