How to find a function that satisfies 2 conditions I am solving a partial differential equation by separation of variables. Part of the solution requires finding a function that meets the following criteria.
f(L,t)=C
f(0,t)=A*cos(at+b)
I was wondering if a function exists and how to find it (I am guessing and checking, wondering if there is a more direct method).
 A: Presumably you want a continuous (or better) such function, because otherwise the problem's trivial. :) Also, I assume $L, C, A, a, b$ are all constants.
Recall the situation in one variable (that is, if I'm given the values of a one-variable function at two points): if I want a function $g$ such that $g(a)=u$ and $g(b)=v$, one easy way to get such a $g$ is to plot a line from $(a, u)$ to $(b, v)$: $$g(x)={x-b\over a-b}u+{x-a\over b-a}v.$$ Now, in your problem you're given the values of a two-variable function at two lines. This might seem harder, but in this case there's a simple way to reduce it to the one-variable situation. 
HINT: for a fixed $t$, consider the single-variable function $f_t: x\mapsto f(x, t)$. We are given desired values for $f_t(0)$ and $f_t(L)$. What should each $f_t$ be? OK, now how do we get from the many, single-variable functions $f_t$ to the specific, two-variable function $f$?
By the way, this is not always the best way to find a function with given boundary values, but you haven't set out any requirements on $f$.
