I am trying to solve the following Cauchy's problem:
$$u_x-3u_y=\sin x + \cos y \\ u(t,t)=p(t) $$
Following the example given here and here.
I guess the system of equations associated with it is:
$$\frac{dx}{1}=\frac{dy}{-3}=\frac{dz}{\sin(x)+\cos(y)}$$
I tried to solve the diferential equations in the following manner
$$\frac{dx}{1}=\frac{dy}{-3}\implies \frac{dy}{dx}=-3\implies y = -3x + c_1$$
$$\frac{dx}{1}=\frac{dz}{\sin(x)+\cos(y)}\implies \frac{dz}{dx}=\sin(x)+\cos(y)\implies z= -\cos(x)+\cos(y)x + c_2$$
But it does not work. And I noticed in the pages I referenced before that the coordinate $z$ appears somewhere, but it does not appear in my solution. I don't know what is going wrong.
The key is already given by Hans Lundmark in comment. The aim of my answer below is to show how to properly apply the boundary condition. $$u_x-3u_y=\sin(x)+\cos(y)$$ Your calculus is correct up to $$y+3x=c_1$$ For the second characteristic equation : $$\frac{du}{dx}=\sin(x)+\cos(y)\implies u+\cos(x)-\int \cos(y)dx = c_2$$ $$u+\cos(x)-\int \cos(c_1-3x)dx = c_2$$ $$u+\cos(x)+\frac13\sin(c_1-3x) = c_2$$ The general solution of the PDE on implicit form $c_2=F(c_1)$ is : $$u+\cos(x)+\frac13\sin\big((y+3x)-3x\big) = F(y+3x)$$ $F$ is an arbitrary function. $$\boxed{u=-\cos(x)-\frac13\sin(y) + F(y+3x)}$$ Condition : $$p(t)=u(t,t)=-\cos(t)-\frac13\sin(t) + F(4t)$$ With $4t=X\quad\implies\quad t=\frac{X}{4}$ $$F(X)=p(\frac{X}{4})+\cos(\frac{X}{4})+\frac13\sin(\frac{X}{4})$$ The function $F(X)$ is determined. We put it into the above general solution where $X=y+3x$ : $$\boxed{u(x,y)=-\cos(x)-\frac13\sin(y) +p(\frac{y+3x}{4})+ \cos(\frac{y+3x}{4})+\frac13\sin(\frac{y+3x}{4})}$$