# What function satisfies these conditions?

In order to solve the PDE I am working with, I need to determine a function $u(x,t)$ that satisfies both of these conditions

$$u(0,t)=\sin(t)$$ $$u(1,t)=\cos(t)$$

I know it is just trial and error but I can't seem to think of a function that has this. Thanks guys

-

$$u(x,t)=x\cos(t)+(1-x)\sin(t)$$

Are there other conditions, too?

-
Is there anyway to determine this other than trial and error? – Greg Harrington Mar 11 '13 at 4:13
This is a pretty standard trick, actually. If you need a function in $x$ and $t$ to look like $f(t)$ when $x=0$ and $g(t)$ when $x=1$, then $$x g(t)+(1-x)f(t)$$ does the job. I'm blanking on the term for this trick at the moment, though. – Cameron Buie Mar 11 '13 at 4:17
Linear interpolation? You are just "drawing a straight line between the two points". – Fixed Point Mar 11 '13 at 4:31
actually there was a third condition that i just saw and it was $u(x,0)=x$ so your function satisfies that as well. Thank you – Greg Harrington Mar 11 '13 at 4:43
I was able to do the rest of the problem. That was the first step of many. Thanks a lot! – Greg Harrington Mar 11 '13 at 4:44

$u(x, t) = \cos(x\pi/2)\sin(t) + \sin(x \pi/2) \cos(t) =\sin(t + x \pi/2)$

When $x = 0$ you get $\sin(t)$, when $x = 1$ you get $\cos(t)$.

-