### Author Topic: HA4-P4  (Read 2603 times)

#### Victor Ivrii

• Elder Member
• Posts: 2599
• Karma: 0
##### HA4-P4
« on: October 10, 2015, 07:24:25 AM »
« Last Edit: October 17, 2015, 05:28:13 AM by Victor Ivrii »

#### Bruce Wu

• Sr. Member
• Posts: 57
• Karma: 0
##### Re: HA4-P4
« Reply #1 on: October 12, 2015, 04:09:18 PM »
a) For $x>3t$ the solution is given by D'Alembert's formula: $$u(x,t)=\frac{1}{6}[\sin(x+3t)-\sin(x-3t)]=\frac{1}{3}\cos(x)\sin(3t)$$
Here we have Dirichlet boundary condition. We use http://www.math.toronto.edu/courses/apm346h1/20159/PDE-textbook/Chapter2/S2.6.html#mjx-eqn-eq-2.6.31. Then for $0<x\leq3t$:$$u(x,t)=\frac{1}{6}[\sin(x+3t)-\sin(3t-x)]=\frac{1}{3}\cos(3t)\sin(x)$$
b) For $x>3t$ the solution is the same as in part a)
Here we have Neumann boundary condition. We use http://www.math.toronto.edu/courses/apm346h1/20159/PDE-textbook/Chapter2/S2.6.html#mjx-eqn-eq-2.6.31-. Then for $0<x\leq3t$:$$u(x,t)=\frac{1}{6}[\sin(x+3t)+\sin(3t-x)]=\frac{1}{3}\cos(x)\sin(3t)$$
c) For $x>3t$: $$u(x,t)=\frac{1}{6}[-\cos(x+3t)+\cos(x-3t)]=-\frac{1}{3}\sin(x)\sin(-3t)=\frac{1}{3}\sin(x)\sin(3t)$$
Dirichlet boundary condition. For $0<x\leq3t$:$$u(x,t)=\frac{1}{6}[-\cos(x+3t)+\cos(3t-x)]=\frac{1}{3}\sin(x)\sin(3t)$$
d) For $x>3t$ the solution is the same as in part c)
Neumann boundary condition. For $0<x\leq3t$:$$u(x,t)=\frac{1}{6}[-\cos(3t-x)+1+-\cos(x+3t)+1]=-\frac{1}{6}[\cos(3t-x)+\cos(x+3t)-2]=-\frac{1}{3}[\cos(3t)\cos(x)-1]$$

#### Zaihao Zhou

• Full Member
• Posts: 29
• Karma: 0
##### Re: HA4-P4
« Reply #2 on: October 15, 2015, 11:05:34 AM »
Hi for a) and b) I got exact opposite signs in the middle. Did you use the formula given in the textbook? I think there in 2.6 Example 1 equation $$\psi(x) = p(-x/c) - \phi(x)$$ is not correct, the correct one should be $$\psi(x) = p(-x/c) - \phi(-x)$$
I think this is the cause of your problem.