---
title: "Laplace equation with u(x,a) = sin(nπx/L)"
subject: "Applied Mathematics"
chapter: 3
key: "semester_4/applied_mathematics:laplace-eq-u-x-a-sin"
source: https://www.bctengineer.com/q/semester_4/applied_mathematics/laplace-eq-u-x-a-sin
site: BCT Engineering
---

# Laplace equation with u(x,a) = sin(nπx/L)

Applied Mathematics · Chapter 3: Partial Differential Equations

- Asked in: 2069 Bhadra; 2071 Bhadra (asked 2 times)
- Video: [Laplace’s Equation: Separation of Variables](https://www.youtube.com/watch?v=8jOqXM8OFh8) — Professor Dave Explains
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_4/applied_mathematics/laplace-eq-u-x-a-sin
- Whole chapter: https://www.bctengineer.com/md/semester_4/applied_mathematics/chapter-3

## Question

Solve ∂²u/∂x² + ∂²u/∂y² = 0, which satisfies the condition u(0, y) = u(L, y) = u(x, 0) = 0 and u(x, a) = sin(nπx/L).

## Short answer

Separate variables selecting X(x) = sin(nπx/L) and Y(y) = sinh(nπy/L). Applying u(x,a)=sin(nπx/L) fixes the coefficient, giving u(x,y) = sin(nπx/L) sinh(nπy/L)/sinh(nπa/L).

## Answer

**Problem.** u_xx + u_yy = 0 in the rectangle 0 ≤ x ≤ L, 0 ≤ y ≤ a, with

- u(0, y) = 0, u(L, y) = 0
- u(x, 0) = 0
- u(x, a) = sin(nπx/L)

**Step 1: separate variables.** u = X(x)Y(y): X″/X = −Y″/Y = −p² (the negative sign is chosen so that X is oscillatory, since X must vanish at both x = 0 and x = L).

```text
X″ + p² X = 0       →  X = A cos px + B sin px
Y″ − p² Y = 0       →  Y = C e^{py} + D e^{−py}
```

**Step 2: conditions at x = 0 and x = L.** A = 0 and B sin pL = 0, so p = mπ/L.

**Step 3: condition at y = 0.** Y(0) = 0 means C + D = 0, so Y ∝ sinh(py).

General solution:

u(x, y) = Σ_{m=1}^{∞} Bₘ sin(mπx/L) sinh(mπy/L)

**Step 4: condition at y = a.**

Σ Bₘ sinh(mπa/L) sin(mπx/L) = sin(nπx/L)

By orthogonality of sines, Bₘ sinh(mπa/L) = 1 for m = n and 0 for m ≠ n. So only the n-th term survives:

Bₙ = 1 / sinh(nπa/L)

**Answer:**

u(x, y) = sin(nπx/L) · sinh(nπy/L) / sinh(nπa/L)

Check: u(x, a) = sin(nπx/L) ✓; u = 0 on the other three sides ✓.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. X''/X = -p^2 because
   A. X must vanish at both x=0 and x=L, needing oscillation
   B. Y must oscillate
   C. it is arbitrary
   D. u is time dependent
   Answer: A. Sine in x. (Key point: Sign)

2. With Y(0)=0, Y is
   A. cosh(py)
   B. proportional to sinh(py)
   C. sin(py)
   D. e^(-py)
   Answer: B. C + D = 0. (Key point: y-solution)

3. Matching sin(n pi x/L) at y=a leaves
   A. all terms
   B. none
   C. only the m = n term
   D. m = 1 only
   Answer: C. Orthogonality. (Key point: Orthogonality)

4. u(x,y)=
   A. sin(n pi x/L) cosh(n pi y/L)/cosh(n pi a/L)
   B. sin(n pi x/L) sinh(n pi y/L)
   C. sinh(n pi x/L) sin(n pi y/L)/sin(n pi a/L)
   D. sin(n pi x/L) sinh(n pi y/L)/sinh(n pi a/L)
   Answer: D. Equals sin at y=a. (Key point: Result)

## Related in Applied Mathematics

- [Laplace equation with u(x,∞) = sin(nπx/l)](https://www.bctengineer.com/question.md?key=semester_4%2Fapplied_mathematics%3Alaplace-eq-u-x-inf-sin) — Applied Mathematics, chapter 3
- [Laplace equation solutions; u(x,0)=sin x](https://www.bctengineer.com/question.md?key=semester_4%2Fapplied_mathematics%3Alaplace-eq-sin-x-bounded) — Applied Mathematics, chapter 3
- [Derive 1D wave equation and solve](https://www.bctengineer.com/question.md?key=semester_4%2Fapplied_mathematics%3Awave-eq-derive-and-solve) — Applied Mathematics, chapter 3, asked 5×
- [Derive 1D heat equation and solve](https://www.bctengineer.com/question.md?key=semester_4%2Fapplied_mathematics%3Aheat-eq-derive-and-solve) — Applied Mathematics, chapter 3, asked 4×
- [Laplace equation in polar form](https://www.bctengineer.com/question.md?key=semester_4%2Fapplied_mathematics%3Alaplace-eq-polar-form) — Applied Mathematics, chapter 3, asked 2×
- [Heat equation, insulated ends, u(x,0)=x](https://www.bctengineer.com/question.md?key=semester_4%2Fapplied_mathematics%3Aheat-eq-insulated-ends-u-x) — Applied Mathematics, chapter 3

## Related in other subjects

- [Solve ODE by Laplace transform y''+2y'+5y=e^(−t)sint](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Asolve-ode-by-laplace-transform-y-six) — Mathematics III, chapter 3, asked 2×
- [Solve ODE by Laplace transform x''+2x'+5x=e^(−t)sint](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Asolve-ode-by-laplace-transform-x) — Mathematics III, chapter 3, asked 17×
- [Solve ODE by Laplace transform y''+2y'+2y=5sinx](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Asolve-ode-by-laplace-transform-y-17) — Mathematics III, chapter 3, asked 17×
- [Solve ODE by Laplace transform y''+2y'−3y=sint](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Asolve-ode-by-laplace-transform-y) — Mathematics III, chapter 3, asked 14×
