Assuming that P=NP - Finding an optimal algorithm for 3SAT Let assume that P=NP so we have both search and decision algorithms for 3SAT at polynomial time.
Can you help me to find an optimal algorithm for optimize 3SAT, i.e.: to find the maximum number of clauses in $\varphi$ that can be satisfied.  

Thank you!

P.S.
You can assume that you have search and decision algorithms for 3SAT at polynomial time - so you can use them...
The following language is in NP (why?):
$$
\{ (\phi,k) : \text{$\phi$ is a CNF and there is an assignment satisfying at least $k$ clauses of $\phi$} \}.
$$
I’ll let you finish the proof.