# Problem 57497. Locate image wells

A mathematical model of wells pumping groundwater near a boundary can be constructed using the method of images, which is also used in fluid mechanics, electrodynamics, and other fields. The method involves reflecting each well about the boundary as shown below: the image well lies on a line running through the real well and perpendicular to the boundary, and the distances between the wells and the boundary are equal.
If a well is pumping water near an impermeable soil unit, then the image well pumps in the same sense (i.e., either both extract water or both inject water): the components of the water velocity perpendicular to the boundary cancel each other and satisfy the condition of no flow across the boundary. If the well is pumping near a river, then the image well pumps in the opposite sense (i.e., one well extracts and the other injects). At the boundary, the water injected by one well replaces the water extracted by the other, and the head, which is related to the water level, is constant on the boundary.
Write a function that takes coordinates of the real wells and coordinates of two points on the boundary and returns the coordinates of the image wells. For this problem you do not have to indicate the sense of the pumping.

### Solution Stats

84.62% Correct | 15.38% Incorrect
Last Solution submitted on Jan 09, 2024

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!