DSolve[{D[u[x,y],{x,2}]+D[u[x,y],x]==0},u[x,y],{x,y}]

DSolve[{D[u[x,y],{x,2}]+D[u[x,y],x]==0,
u[0,y]==y,((D[u[x,y],x])/.x->0)==y^2},u[x,y],{x,y}]

DSolve[{D[u[x,y],{x,2}]+D[u[x,y],x]==0,u[0,y]==y^2,u[1,y]==3y},u[x,y],{x,y}]

DSolve[{D[v[x,y],y]+2 v[x,y]==0,v[x,0]==x},v[x,y],{x,y}]
DSolve[{D[u[x,y],x]==v[x,y]/.%,u[0,y]==1+2y},u[x,y],{x,y}]

Clear[U,X,T,x,t,X]
U[x_,t_]=X[x] T[t]
{D[U[x,t],{x,2}],1/c^2*D[U[x,t],{t,2}]}
%/U[x,t]
Map[#==-ω^2&,%]
sol=MapThread[DSolve[#1,#2,#3]&,
{%,{X[x],T[t]},{x,t}}]//Flatten

sol[[1]]=sol[[1]]/.C[1]->0/.C[2]->1;
X[x]T[t]/.sol/.ω->n/.c->1/.C[2]->0/.C[1]->1
U[x_,t_,n_]=%
Plot[U[x,0,3],{x,0,Pi},PlotRange->{-1,1}]
Manipulate[Plot[U[x,t,n],{x,0,Pi},PlotRange->{-1,1}],{t,0,2Pi},{n,1,4,1}]