\documentclass[bibtotoc]{scrartcl}
%\usepackage{bm}
\usepackage{url}
\usepackage{breqn}
\usepackage{cite}
%\usepackage{enumitem}
\usepackage{eurosym}
\usepackage{footnote}
\usepackage{soul}
%\usepackage{hyperref}

\usepackage{extramarks}
\usepackage{stackengine}
\usepackage{fancyhdr}
\usepackage{setspace}
\usepackage{bbm, amsmath, amssymb, amsfonts}
%\usepackage[english]{babel}
\usepackage{babel}
%\usepackage[nyt]{biblatex}
\usepackage[authoryear, round]{natbib}
\usepackage[utf8]{inputenc}
\usepackage{array, colortbl}
\usepackage{xcolor}
\usepackage{fancybox}
\usepackage{ulem}
\usepackage[amsmath, thref, thmmarks]{ntheorem}
\usepackage{graphicx, caption}
\usepackage{stmaryrd}
\usepackage{hyperref}
\usepackage{mathrsfs}
\usepackage{nicefrac}
\usepackage{dsfont}
\usepackage{natbib}
\usepackage{xr-hyper}
\externaldocument{Revised_File_1_2}
\bibliographystyle{apalike}
%\bibliographystyle{acm}
\pagestyle{headings}

\newtheorem{defi}{Definition}[section]
\newtheorem{lemm}[defi]{Lemma}
\newtheorem{example}[defi]{Example}
\newtheorem{satz}[defi]{Satz}
\newtheorem{bem}[defi]{Remark}
\newtheorem{koro}[defi]{Korollar}
\newtheorem{beh}[defi]{Behauptung}
\newtheorem{theo}[defi]{Theorem}
\newtheorem{prop}[defi]{Proposition}

\theoremstyle{nonumberbreak}
\theoremheaderfont{\scshape}
\newtheorem{bew}{Proof}

\renewcommand{\baselinestretch}{1.56}
\setlength{\parindent}{25pt}
\newcommand{\LRA}{\Leftrightarrow}
\newcommand{\piff}[2]{\frac{\partial #1}{\partial #2}}
\newcommand{\di}[1]{\mbox{\,d} #1}
\newcommand{\diff}[2]{\frac{\mbox{d} #1}{\mbox{d} #2}}
\newcommand\barbelow[1]{\stackunder[1.2pt]{$#1$}{\rule{.8ex}{.075ex}}}
%\newcommand{\2piff}[2]{\frac{\partial^2 #1}{(\partial #2)^2}}
%\newcommand{\12piff}[3]{\frac{\partial^2 #1}{(\partial #2)(\partial #3)}}
\newcommand{\bm}[1]{\mbox{\boldmath $#1$}}
\newcommand{\Real}{\mathbb R}

%\theoremstyle{nonumberbreak}
%\theoremsymbol{$\square$}
%\theorembodyfont{\upshape}
%\theoremheaderfont{\scshape}
%\newtheorem{bew}{Beweis}
%\newtheorem{idee}{Beweisidee}
%\newtheorem{rech}{Begründung}
%\numberwithin{equation}{section}
%\newcommand{\sgn}{\text{sgn}}


\begin{document}
\begin{appendix}

\setcounter{section}{1}      % 0 = A, 1 = B
\numberwithin{equation}{section}
\section{Supplementary Material}
\subsection{Second order-conditions and corner solutions of the social optimum for a single upstream R\&D firm}

In this section, we provide sufficient second-order conditions for an interior  social optimum in the case of a single upstream R\&D firm.


Recall that the social cost is given by
	\begin{equation*}
	SC=\int\limits_{0}^{x}\left[C^I(e_{\tilde{x}},r,\tilde{x}) +c+F(\tilde{x})\right]d\tilde{x}+[1-x]C^0(e_{0})+d\left[
	\int\limits_{0}^{x}e_{\tilde{x}}d\tilde{x}+(1-x)e_{0}\right]+\Gamma (r) 
	\end{equation*}
%i.e.\ it consists of the abatement costs incurred by the mass $x$ of adopting firms, the production costs of the new technology $c\cdot x$, the total installation costs $\int_{0}^{x}F(\tilde{x})d\tilde{x}$, depending on the firm-specific parameter $\tilde{x}$, further in the mass of abatement costs resulting from the conventional technology, and finally in the damages resulting from the total emissions.

The minimum social cost is given by the following first-order conditions. First,
optimal emissions are determined by the usual rule that marginal abatement costs equal marginal damages.
	\begin{align} 
		-C^0_{e}(e_0^*) &= d \label{optimal_emissions0} \\
		-C^I_{e}(e_x^*,r^*,x) &= d \label{optimal_emissionsX}
	\end{align}
where $e_x^*$ is the optimal emission level of firm at location $x$ under the new technology.
	
In an interior solution, i.e.\ for $0<x^*<1$, the optimal share of adopting firms $x^*$, corresponding to the marginal firm adopting the new technology, is given by:
	\begin{align} \label{FOC_xa}
		C^I(e_{x^*}^*,r^*,x^*) + c + F(x^*) + d e_{x^*}^* &= C^0(e_0^*) + d e_0^*
	\end{align}
That is, the social cost of using the new technology for the marginal adopting firm at location $x^*$ must be equal to the social cost of sticking with the old one.  
 
For a corner solution, i.e.,\ for $x^*=1$  (or $x^*=0$), the optimal adoption technology adoption is determined by:
	\begin{align} \label{FOC_xb}
		C^I(e_1^*,r^*,1) + c + F(1) + d e_1^* & \leq C^0(e_0^*) + d e_0^*  \mbox{\qquad for $x^*=1$} \\
        C^I(e_{x^*}^*,r^*,0) + c + F(0) + d e_{x^*}^* & > C^0(e_0^*) + d e_0^* \mbox{\qquad for $x^*=0$} \label{FOC_xbB}
	\end{align}
Finally, the optimal degree of technology improvement is given by:
	\begin{align} \label{FOC_r}
		\int\limits_{0}^{x^*}[-C^I_r(e_{\tilde{x}}^*,r^*,\tilde{x})]d\tilde{x}  & = \Gamma'(r^*)
	\end{align}
%which tell us that the total marginal benefit of the abatement cost reduction of the new technology across all adopting downstream firms equals the marginal cost of technology improvement.
For second-order conditions, note that
	\begin{align}
		\frac{\partial^2{SC}}{{\partial x^2}}  = &	\left[C^I_{e}(e_x,r,x)+d\right]\frac{\partial{e_x}}{\partial x} + C_{x}^{I}(e_x,r,x) + F'(x) \nonumber  \\
		 \stackrel{\eqref{optimal_emissionsX}}{=} & C_{x}^{I}(e_x,r,x) + F'(x) >0 \\
		\frac{\partial^2{SC}}{\partial x \partial r}= & -C_r^{I}(e_x,r,x)>0\\
		\frac{\partial^2{SC}}{{\partial r^2}}  = & \int_0^{x} C_{rr}^{I}(e_{\tilde{x}},r,\tilde{x}d \tilde{x}) + \Gamma^{\prime\prime}(r) >0 
	\end{align}
Hence for an interior solution to be a cost minimum, the following condition must hold:
	\begin{align}\label{geneq}
		\left[C_{x}^{I}(e_{x^*}^*,r^*,x^*) + F'(x^*)\right] \left[\int_0^{x^*} C_{rr}^{I}(e_{\tilde{x}}^*,r^*,\tilde{x})d \tilde{x} + \Gamma^{\prime\prime}(r^*)\right] > [C_r^{I}(e_{x^*}^*,r^*,x^*)]^2
	\end{align}
%	By this we see that the existence of an inner solution can be forced by setting the marginal costs $F^{\prime}(x)$ of technology adoption along the firms  sufficiently high.
This condition suggests that the second-order condition is satisfied if the 
marginal costs $F^{\prime}(x)$ of technology adoption along the firms and/or $\Gamma''(r)$ are sufficiently large, i.e. the adoption cost $F(x)$ is sufficiently steep in $x$ and the cost of technology improvement is sufficiently convex. However, the following example shows that this is not enough. In fact, we also need $F(x)$ to be sufficiently convex.
\begin{example}\label{example}
Let $C^{0}(e)=(A-e)^{2}/2$,  $C^I(e,r)=(A-r-e)^{2}/2$, and $F(x)=f\cdot x^a$ with $a\geq 1$. Here, only the fixed installation costs depend on the firm specific parameter $x$. Moreover let  $\Gamma (r)=\gamma r^{2}/2$.
\end{example}
Thus, the cost function of the new technology is independent of $x$.
Optimal emissions are given by $e_{0}=A-d$, and $e_{I}=A-r-d$. Since $C^I(\cdot,\cdot)$ is independent of $x$, we denote the emissions of the innovating firms by $e_{I}$ instead of $e_{x}$.
Inserting optimal emissions in the abatement cost functions, these boil down to: $C^{0}(e_0)= C^{I}(e_I)=d^2/2$, and thus $C^{0}(e_0)- C^{I}(e_I)=0$, while $e_{0}-e_{I}=r$.
By (\ref{FOC_xa}) and (\ref{FOC_r}) the first-order conditions with respect to $x$ and $r$ become:
	\begin{align}
	\frac{\partial SC}{\partial x} &= c+fx^a-dr= 0 \label{foc_x2} \\
	\frac{\partial SC}{\partial r} &= -dx+\gamma r = 0 \label{foc_r2}
\end{align}
For $a=1$ we obtain
\begin{align}
		x^* &= \frac{c\gamma}{d^2-\gamma f} \label{ex_foc-x} \\
		r^* &=  \frac{c d}{d^2-\gamma f} \label{ex_foc-r}
	\end{align}
Note that for a fixed technology parameter $r$, \eqref{ex_foc-x} yields an optimal solution for the share of adopting firms $x^*(r)$ and satisfies the second-order condition, as $\frac{\partial^2 SC}{(\partial x)^2}=f>0$.

Similarly, for fixed share of adopting firms $x$, \eqref{ex_foc-r} yields an optimal solution for the degree of technology improvement $r^*(x)$ and satisfies the second-order condition, as $\frac{\partial^2 SC}{(\partial r)^2}=\gamma >0$.

For overall optimization over $x$ and $r$, however, we need to look at the 
Hessian matrix for second-order conditions to obtain:
\begin{equation*}
	H=\left(\begin{matrix}
		f & -d\\
		-d & \gamma
	\end{matrix}\right)
\end{equation*}
So we get a social cost minimum if and only if $f\gamma-d^2>0$. However, this implies that the optimal solutions were negative.

Thus, optimality requires corner solutions, $(0,0)$ with no adoption or $\left(1, \frac{d}{\gamma}\right)$ with full adoption. For full adoption to be optimal, we need $SC(0,0)>SC(1,\frac{d}{\gamma})$.

Further calculations yield
\begin{equation*}
	\begin{aligned}
		SC\left(1,\frac{d}{\gamma}\right)-SC(0,0)= c+\frac{f}{2}-\frac{d^2}{2\gamma} .
	\end{aligned}
\end{equation*}
This is negative if and only if $d^2 > 2\gamma\left(c+\frac{f}{2}\right)$,
i.e.\ if the marginal damage is sufficiently high compared to the cost parameters $c$ and $f$. 

%Now consider the case $a>1$. The Hessian now reads
%\begin{equation*}
%	H=\left(\begin{matrix}
%		fax^{a-1} & -d\\
%		-d & \gamma
%	\end{matrix}\right)
%\end{equation*}
%and its determinant is positive if
%\begin{equation} \label{SEC}
%		fax^{a-1} \gamma > d^2
%\end{equation}
%Substituting (\ref{foc_r2}) into (\ref{foc_x2}) we get 
%\begin{equation*}
%\begin{aligned}
%    G(x) \equiv c+	fx^{a} - \frac{d^2 x}{\gamma} &= 0\\
%    \Leftrightarrow  x\left(fx^{a-1} -\frac{d^2}{\gamma}\right)&=-c
%\end{aligned}
%\end{equation*}
%Comparing this to \eqref{SEC}, we see that there is no non-negative interior solution for $a=1$.

For $a=2$, by contrast, we can show that the optimal share if adopting firms can be characterized as follows:
\begin{equation} \label{case_a=2}
    x^*(f)=\left\{
    \begin{array}{lll}
    1 & \mbox{if} & 0 \leq f \leq \max \{ \frac{d^2}{\gamma} - c, \frac{d^2}{2 \gamma} \} \\
    \frac{d^2+\sqrt{d^4-4cf\gamma^2}}{2f \gamma}  &  \mbox{if} & \max \{ \frac{d^2}{\gamma} - c , \frac{d^2}{2 \gamma} \} \leq f \leq
    \frac{d^4}{4 c \gamma^2} \\
    0 &  \mbox{if} & f \geq
    \frac{d^4}{4 c \gamma^2} 
    \end{array}
    \right.
\end{equation}
The derivation can be found in the Appendix \ref{a1app}. We observe that for sufficiently small values of $f$, full adoption is the optimal choice. Conversely, for sufficiently large values of $f$, adoption is not optimal for any firm. For intermediate values of $f$, there is an interior solution for $x$ that decreases in $f$.

Rearranging also gives an interpretation with respect to the magnitude of marginal damage:
\begin{equation} \label{damage_case_a=2}
    x^*(d)=\left\{
    \begin{array}{lll}
    1 & \mbox{if} & d \geq \max \{ \sqrt{2\gamma f}, \sqrt{\gamma(f-c)}\} \\
    \frac{d^2+\sqrt{d^4-4cf\gamma^2}}{2f \gamma}  &  \mbox{if} &  \sqrt[4]{4cf\gamma^2}\leq d \leq \max \{ \sqrt{2\gamma f}, \sqrt{\gamma(f-c)}\} \\
    0 &  \mbox{if} & 0\leq d\leq  \sqrt[4]{4cf\gamma^2}
    \end{array}
    \right.
\end{equation}
We observe that full adoption is optimal for large values of $d$, whereas no adoption is optimal for small values of $d$.
%we obtain an interior solution for a cost minimum when $\gamma(f+c)>d^2$. From the structure of $G$ we may conclude that there should be an $a_0\in[1,2]$ such that there exists an interior solution for all $a>a_0$.


%Question: Is $a=1$ the smallest value for $a$, where no interior solution exists? For what values of $a$ is it possible to obtain an interior solution?\\

We can summarize the findings from this section as follows:
\begin{prop}
    While the separate problems of determining the optimal degree of technology adoption for a fixed level of technology, on the one hand, and determining the optimal degree of technology improvement for a given share of adopting firms, on the other, have interior solutions under the convexity conditions 
    \begin{align}
       & C_{x}^{I}(e_{x^*}^*,r^*,x^*) + F'(x^*)>0, \hspace{0.5cm}
        \int_0^{x^*} C_{rr}^{I}(e_{\tilde{x}}^*,r^*,\tilde{x})d \tilde{x} + \Gamma^{\prime\prime}(r^*)>0\nonumber
    \end{align}
    the joint problem may lead to a corner solution with full technology adoption. 
    To obtain an interior solution for both technology level and the share of adoption the social cost function must be  sufficiently convex such that
    \begin{align}
		\left[C_{x}^{I}(e_{x^*}^*,r^*,x^*) + F'(x^*)\right] \left[\int_0^{x^*} C_{rr}^{I}(e_{\tilde{x}}^*,r^*,\tilde{x})d \tilde{x} + \Gamma^{\prime\prime}(r^*)\right] > [C_r^{I}(e_{x^*}^*,r^*,x^*)]^2\nonumber
	\end{align}
\end{prop}
In other words, if the social cost function is not sufficiently convex with respect to both technology levels and the proportion of adopting firms, the social planner will aim to improve the technology to the extent that it is suitable for each potential adopter, and vice versa. 

%\section{Extended quadratic example for the duopoly case}
%In this section we consider a specific example with the functional form $C^{I}(e,r,x)= (A-b\cdot e - \rho \cdot r + \xi\cdot x)^2/2b$ for the abatement cost. This allows us to derive even clearer results, especially for comparative statics.
%More precisely, we choose $C^{I_1}(e_{x,1},r_1,x)= \frac{(A-\rho_1 r_1-b e_{x,1}+\xi x)^2}{2b}$ and $ C^{I_2}(e_{x,2},r_2,x)= \frac{(A-\rho_2 r_2-b e_{x,2}+\xi (1-x))^2}{2b}$ for the duopoly case, where $b>0$, $\rho_1>0$, $\rho_2>0$ and $\xi>0$. Note that $C^{I_1}_{r_1,x}<0$ holds in this example. As we will see below, larger $x$ induces higher emissions, and since $-C^{I_1}_{r_1,x}>0$, technology improvement is more effective for firms with higher technology/location parameters $x$.

%The installation costs are assumed to be quadratic of the form $F_1(x)=\frac{fx^2}{2}, F_2(x)= \frac{f(1-x)^2}{2}$. Furthermore let the technology improvement cost be $\Gamma_i(r_i)=\frac{\gamma r_i^2}{2}$ for $i=1,2$ and the production cost be $c$ for both upstream firms. Thus, to simplify the calculations we assume symmetry between the two firms except for the technology parameters $\rho_1,\rho_2$.

%In the quadratic case, the optimal emissions are $e_{x,1}= \frac{A-\tau -\rho_1 r_1+\xi x}{b}$ and $e_{x,2}= \frac{A-\tau -\rho_2 r_2+\xi (1-x)}{b}$, and plugging in the functional forms into the indifference condition
%$  C^{I_1}(e_{x,1}(\tau),r_1,x)+F_1(x)+p_1+\tau e_{x,1}(\tau) = C^{I_2}(e_{x,2}(\tau),r_2,1-x)+F_2(1-x)+p_2+\tau e_{x,2}(\tau),$
%the downstream firm is indifferent between technology 1 and 2 if
%\begin{eqnarray}
%    &&\frac{\tau^2}{2b}+\frac{f x^2}{2}+p_1+\tau\left(\frac{A-\tau-\rho_1 r_1 +\xi x}{b}\right)\nonumber\\ &=& \frac{\tau^2}{2b}+\frac{f (1-x)^2}{2}+p_2+\tau\left(\frac{A-\tau-\rho_2 r_2 +\xi (1-x)}{b}\right)\nonumber
%\end{eqnarray}
%the demand for technology 1 becomes
%\begin{eqnarray}\label{xduoquadratbeispiel}
 %    \tilde{x}(p_1,p_2,r_1,r_2;\tau)&=&
  %   \frac{1}{2} + \frac{b(p_2-p_1)+\tau(\rho_1 r_1-\rho_2 r_2)}{bf+2\tau\xi}
%\end{eqnarray} 
%By differentiating with respect to prices we obtain $\frac{\partial \tilde{x}}{\partial p_1} = -\frac{\partial \tilde{x}}{\partial p_2}= \frac{-b}{bf+2\tau\xi}<0 $. 

%Maximizing profits in the price setting stage leads to equilibrium prices
%\begin{eqnarray}
 %   p_1(r_1,r_2)&=&c+\frac{f}{2}-\frac{2}{3}s_1-\frac{1}{3}s_2+ \frac{\tau\xi}{b} +\frac{\tau}{3b}(\rho_1 r_1 -\rho_2 r_2)\nonumber\\
  %  p_2(r_1,r_2)&=&c+\frac{f}{2}-\frac{2}{3}s_2-\frac{1}{3}s_1+ \frac{\tau\xi}{b} +\frac{\tau}{3b}(\rho_2 r_2 -\rho_1 r_1)\nonumber
%\end{eqnarray}
%The comparative statics effects with respect to the technology levels are then given by \footnote{Note that the results are in line with the formulas derived in chapter 5 of the main document.}
%\begin{subequations}
%\begin{align}
 %   \piff{p_1}{r_1}&= \frac{ \rho_1\tau}{3b}>0, \qquad \quad \piff{p_2}{r_2} =\frac{ \rho_2\tau}{3b} >0 \label{csquadduo1} \\
  %  \piff{p_1}{r_2} &= -\frac{ \rho_2\tau}{3b}<0, \qquad \; \piff{p_2}{r_1}=-\frac{ \rho_1\tau} {3b} <0 \label{csquadduo2}
%\end{align}
%\end{subequations}
%We observe that the effect of the technology levels on the prices are unique and independent of $\xi$.
%Maximizing profits in the technology setting stage, the optimal technology levels become
%\begin{subequations}
%\begin{align}
 %   r_1 &= \frac{\rho_1 \tau\left(3b^2\gamma \left(3f+2s_1-2s_2\right) +18b\gamma\xi\tau-4\rho_2^2\tau^2\right)}{3b\gamma\left(9b^2 f\gamma +18 b\gamma\xi\tau -2\left(\rho_1^2+\rho_2^2\right)\tau^2\right)}\label{r1_duo} \\
   % r_2 &=\frac{\rho_2 \tau\left(3b^2\gamma \left(3f+2s_1-2s_2\right) +18b\gamma\xi\tau-4\rho_1^2\tau^2\right)}{3b\gamma\left(9b^2 f\gamma +18 b\gamma\xi\tau -2\left(\rho_1^2+\rho_2^2\right)\tau^2\right)} \label{r2_duo}
%\end{align}
%\end{subequations}
%Differentiating \eqref{r1_duo} and \eqref{r2_duo} with respect to $\tau$, we obtain for $i=1,2$
%%   r_i^{\prime}(\tau)&=&\frac{\rho_i}{3 b \gamma q^2}\left[27\gamma^2b^4f(3f-2s_1+2s_2)+324b^3\gamma^2 f \xi \tau\right.\nonumber\\
  %  &+& \left.(6\gamma 
 %b^2(\rho_1^2+\rho_2^2)(3f+2s_1-2s_2)+324b^2\gamma^2\xi^2-108\rho_j^2 b^2 f \gamma))\tau^2 \right.\nonumber\\
%&-& \left. 144\rho_j^2\gamma b \xi\tau^3+8\rho_j^2(\rho_1^2+\rho_2^2)\tau^4\right]\label{rivontau}
%\end{eqnarray}
%where $q:= 9b^2 f\gamma +18 b\gamma\xi\tau -2\left(\rho_1^2+\rho_2^2\right)\tau^2$.

%In the symmetric case, i.e. $\rho_1=\rho_2=\rho, s_1=s_2=s$, the technology levels boil down to $r_1=r_2=\frac{\rho\tau}{3b\gamma}$ and their comparative statics effects $r_i^{\prime}(\tau)=\frac{\rho}{3b\gamma}$ are both positive. 

%One can show that in the asymmetric case, for suitable parameters and for a given $\rho_i$ one can set $\rho_j$ such that $r_i^{\prime}(\tau)<0$ holds. By taking a closer look at \eqref{rivontau}, it is clear that $\rho_j$ must be large, but not too large compared to $\rho_i$ to obtain this effect. 

%We omit the expressions for the equilibrium prices in general. In a symmetric scenario, they are $p_1=p_2=c+\frac{f}{2}-s+\frac{\xi\tau}{b}.$ Thus, $p_1^{\prime}(\tau)=p_2^{\prime}(\tau)=\frac{\xi}{b}.$ Note that even in the symmetric case, firms want to increase their technology levels in response to a higher emissions tax in order to increase their market shares. However, since both firms do this in equilibrium, market shares do not change. 
%This is due to the effect of downstream firms having a higher incentive to reduce pollution.

%and their heterogeneity. \footnote{Comparison further yields that this is line with the general comparative statics results from \ref{taxstatduop} }.%

%The first-best policy consists of a Pigouvian tax $\tau=d$ and an output subsidy system given by 
%\begin{subequations}
%\begin{align}
 %  s_1 &= -\frac{x^*}{\piff{\tilde{x}}{p_1}}= \left(f+\frac{2\tau\xi}{b}\right)x^*=\frac{f}{2}+(p_2-p_1)+\frac{d}{b}\left[\xi+\rho_1r_1^*-\rho_2r_2^*\right] \\
  %  s_2 &= \frac{1-x^*}{\piff{\tilde{x}}{p_2}}= \left(f+\frac{2\tau\xi}{b}\right)(1-x^*)=\frac{f}{2}+(p_1-p_2)+\frac{d}{b}\left[\xi+\rho_2r_2^*-\rho_1r_1^*\right]
%\end{align}
%\end{subequations}

%Thus, a higher technology parameter $\rho_i$ requires a higher subsidy for technology $i$ and a lower subsidy for technology $j=3-i$.
%The first best optimal subsidies are generally given by
%\begin{subequations}
%\begin{align}
  %  \zeta_1 &= \int_0^{x^*} -C_{r_1}^{I_1}(e_{\tilde{x},1}^*,r_1^*,\tilde{x})d\tilde{x} 
    %+ \left[ C_{r_1}^{I_{1}} - \piff{p_2}{r_1} \right]x^*
   % \label{zeta1supp} \\
    % \zeta_2 &= \int_{x^*}^1 -C_{r_2}^{I_1}(e_{\tilde{x},2}^*,r_2^*,1-\tilde{x})d\tilde{x}   + \left[ C_{r_2}^{I_{2}}- \piff{p_1}{r_2}\right](1- x^*)  \label{zeta2supp}
%\end{align}
%\end{subequations}
%Because $C^{I_i}_{e_ir_i} C^{I_i}_{e_ix_i} - C^{I_i}_{e_ie_i} C^{I_i}_{r_ix_i} =0$ for $i=1,2$, proposition 4.1 yields that
%\begin{subequations}
%\begin{align}
 %   \zeta_1&= -x^*\piff{p_2}{r_1}=x^*\frac{\rho_1\tau}{3b} \label{ressubsexamduo1} \\
  %  \zeta_2&= -(1-x^*)\piff{p_1}{r_2}=(1-x^*)\frac{\rho_2\tau}{3b}\label{ressubsexamduo2}
%\end{align}
%\end{subequations}
%Both are clearly positive, which is due to the strategic effects $\piff{p_i}{r_j}$. This does in contrary not hold in the case of a monopolistic upstream firm. In this case, the research subsidy is zero according to Proposition 4.1. 
\subssection{Extension: The Hinterland model}
A limitation of our duopoly model is that it leads either to local monopolies or to full market coverage. In other words, there is no situation where the upstream firms compete for market share, but 'no technology adoption' is also an option for the downstream firms. A situation like this can be derived by characterizing the downstream firms by more than one firm-specific parameter.
Since such a model turns out to be hardly tractable, we propose a simpler, stylized model that retains the one-dimensional space of firm characteristics but allows for incomplete market coverage.

\subsection{Model Extension}
We refer to this model extension as the "hinterland model" because we assume that, in addition to the continuum of adopting firms $x\in[0,1]$ from the duopoly model, each upstream firm exclusively serves downstream firms in its respective hinterland. 
As illustrated in Figure \ref{fig: hinterland}, there is additional demand $x_1^H(p_1,r_1)$ and $x_2^H(p_2,r_2)$ from the respective hinterland customers, which also vary numerically between 0 and 1, but depend only on the variables chosen by the upstream firm $i=1,2$. In contrast, the market area in which the upstream firms compete is still fully supplied.
%\footnote{In the literature, hinterland models appear in different forms and contexts. Most often they are used in transportation models to model the hinterland of ports. Early examples are \citep{Mikolajski_1964} and \citep{Rimmer_1967}.}

\begin{figure}[h]
\centering
\includegraphics[width=\textwidth]{Pic/Hinterland}
\caption{Illustration of the hinterland model}
\label{fig: hinterland}
\end{figure}

We further assume that upstream firms either cannot distinguish between customers in the hinterland and customers in the middle interval $[0,1]$ or are not allowed to price discriminate. 

Therefore, hinterland customers observe the same prices, $p_1$ and $p_2$, as customers in the market area where upstream firms compete for market share. Thus, under an emission tax of $\tau$, downstream hinterland customers will choose to purchase the new technology whenever its price and level are attractive enough. The marginal firm is indifferent between adoption and non-adoption, and determines demand from hinterland customers. Hinterland customers will adopt if
\begin{equation}\label{hinterlandindiff}
   C^{I_{i}}(e_{x_i^H,i}(\tau),r_i,\alpha_i x_i^H) + F_{i}(\alpha_i x_i^H) + p_i + \tau e_{x_i^H,i}(\tau) \leq  C^0 (e_0(\tau)) + \tau e_0(\tau)
\end{equation}
where $e_{x_i^H,H}$ denotes the emissions of a hinterland customer (i.e.\ downstream firm) $x_i^H$ with technology $i$.
Thus, we assume that the hinterland uses technology $i$ and incurs the same abatement costs, $C^{I_i},$ and installation costs, $F_i.$ The parameters $\alpha_1, \alpha_2$ allow for hinterland areas of different sizes compared to each other and to the area in which both upstream firms compete.

If \eqref{hinterlandindiff} holds with equality for the marginal adopter, this gives implicit demands $x_i^H(p_i;r_i)$. Differentiating these with respect to $p_i$ yields\footnote{ Note that we have $\frac{\partial x_i^H}{\partial p_j}=0$ for both firms, i.e.\ the other firm's price has no effect on the demand of the own exclusive customers.}
\begin{equation*}
    \begin{aligned}
        \frac{\partial x_1^H}{\partial p_1} &= -\frac{1}{\alpha_1\left(C_{x_1^H}^{I_{1}}(e_{x_1^H,1}(\tau),r_1,\alpha_1 x_1^H)+F_{1}^{\prime}(\alpha_1  x_1^H)\right)} < 0\\
        \frac{\partial x_2^H}{\partial p_2} &= -\frac{1}{\alpha_2\left(C_{x_2^H}^{I_{2}}(e_{x_2^H,2}(\tau),r_2,\alpha_2 x_2^H)+F_{2}^{\prime}(\alpha_2 x_2^H)\right)} < 0\\
    \end{aligned}
\end{equation*}

Additionally, the duopoly results still hold for the middle interval. 
 
Next, define 
\begin{eqnarray}
    \tilde{x}_1(p_1,p_2; r_1,r_2):=x_1^H(p_1; r_1)+\tilde{x}(p_1,p_2; r_1, r_2)\nonumber
\end{eqnarray} as the  quantity of technology 1 sold, 
\begin{eqnarray}
    \tilde{x}_2 (p_1,p_2;r_1,r_2):=x_2^H(p_2;r_2)+1-\tilde{x}(p_1,p_2;r_1,r_2)\nonumber
\end{eqnarray}
as the quantity of technology 2 sold and in the following calculations, we will write it in short form as $\tilde{x}_1$, $\tilde{x}_2$.

Then, under possible output subsidies $s_1,s_2$, technology subsidies $\zeta_1,\zeta_2$ and marginal production cost $c_1,c_2$, the profits become
\begin{subequations}
\begin{align}
         \Pi_1(p_1, p_2 ;r_1,r_2;\tau) &= \left[p_1+s_1-c_1\right] \left(x_1^H+ \tilde{x}\right)-(1-\zeta_1)\Gamma_1(r_1) \nonumber\\
        &= \left[p_1+s_1-c_1\right] \tilde{x}_1-(1-\zeta_1)\Gamma_1(r_1)\label{prof1hin}\\
        \Pi_2(p_1,p_2;r_1,r_2;\tau) &= \left[p_2+s_2-c_2\right] (x_2^H+ 1-\tilde{x}) -(1-\zeta_2)\Gamma_2(r_2) \nonumber\\
        &=\left[p_2+s_2-c_2\right]\tilde{x}_2 -(1-\zeta_2)\Gamma_2(r_2) \label{prof2hin}
\end{align}
\end{subequations}
\subsubsection{Upstream firm's new sequential game}
As in the duopoly case, firms first choose their technology level and then set their prices. We solve the problem backwards, starting with the price-setting stage. Profit maximization with respect to prices yields
\begin{eqnarray}
    \frac{\partial \Pi_1}{\partial p_1}= \tilde{x}_1 + (p_1+s_1-c_1)\frac{\partial\tilde{x}_1}{\partial p_1}=0\label{foc1}\\
    \frac{\partial \Pi_2}{\partial p_2}= \tilde{x}_2 + (p_2+s_2-c_2)\frac{\partial\tilde{x}_2}{\partial p_2}=0\label{foc2}
\end{eqnarray}
These conditions lead to response functions $p_1^{*}= p_1^*(p_2;r_1,r_2)$ and $p_2^*=p_2^*(p_1;r_1,r_2)$. Differentiating with respect to $p_2$ and $p_1$ respectively, we obtain
\begin{eqnarray}
    (p_1^*)^{\prime}(p_2)&=& \frac{\piff{\tilde{x}}{p_1}+(p_1+s_1-c_1)\piff{^2\tilde{x}}{p_1^2}}{2\piff{\tilde{x}_1}{p_1}+(p_1+s_1-c_1)\piff{^2\tilde{x}_1}{p_1^2}}\nonumber\\
    (p_2^*)^{\prime}(p_1)&=& \frac{-\piff{\tilde{x}}{p_2}+(p_2+s_2-c_2)\piff{^2\tilde{x}}{p_2^2}}{2\piff{\tilde{x}_2}{p_2}+(p_2+s_2-c_2)\piff{^2\tilde{x}_2}{p_2^2}}\nonumber
\end{eqnarray}

By second-order condition of profit maximization it holds that $2\piff{\tilde{x}_1}{p_1}+(p_1+s_1-c_1)\piff{^2\tilde{x}_1}{p_1^2}<0$ and $2\piff{\tilde{x}_2}{p_2}+(p_2+s_2-c_2)\piff{^2\tilde{x}_2}{p_2^2}<0 $. As in the duopoly model, one can conclude that, if firms are not too asymmetric, the reaction functions increase with a slope less than one, and there is hence a unique equilibrium $(p_1,p_2)=(p_1(r_1,r_2),p_2(r_1,r_2))$ given the technology levels chosen in the first stage.

Performing a comparative statics analysis, we obtain the following result:
\begin{prop}\label{hintcompstatpirj}
In a subgame perfect Nash-equilibrium for a symmetric cost structure and if $|D_i^{erx}|$  and $|D_{H_i}^{erx}|$ are sufficiently small we have $\piff{p_i}{r_i} >0$ for $i\in\{1,2\}$. 
In addition to the duopoly situation, there is a hinterland effect that increases both $\piff{p_i}{r_i}$ and $\piff{p_i}{r_j}$.
This effect is larger for the own-price effect than for the cross-price effect. Thus it holds
\begin{equation*}
    \piff{p_i}{r_i} \geq \Big|\piff{p_j}{r_i}\Big|
\end{equation*}
for $i=1,2.$
\end{prop}
The proof can be found in the appendix \ref{proofcshint}. We see that the comparative statics effects differ from those of the classical duopoly model in several ways. Firstly, with better technology, an upstream firm can raise its own price to a greater extent than in a duopoly. This is because there is another market in which the upstream firm has monopoly power. Secondly, the other upstream firm does not  have to lower its price as much in response to its competitor's superior technology. In particular, Proposition 4.3 no longer holds true. This is because some customers are exclusive to one firm or the other, and the competing firm raises its price by more than it would in a pure duopoly situation. If $|C_{r_j}^{I_j}|$ for hinterland customers is large enough, the cross-price effect may even be positive.

\subsubsection{First-stage profit maximization and first-best optimal policy}\label{socopthin}
In the first stage, firms maximize profits w.r.t. the technology level. Taking into account the reaction of prices and market shares yields the first-order conditions
\begin{subequations}
\begin{eqnarray}
    \frac{\partial p_1}{\partial r_1} \tilde{x}_1 + (p_1+s_1-c_1)\left[\frac{\partial \tilde{x}_1}{\partial p_1}\frac{\partial p_1}{\partial r_1} + \frac{\partial \tilde{x}}{\partial p_2}\frac{\partial p_2}{\partial r_1}+\piff{\tilde{x}_1}{r_1}\right] -(1-\zeta_1)\Gamma^{\prime}_1(r_1) &=& 0\label{98}\\
    \frac{\partial p_2}{\partial r_2} \tilde{x}_2 + (p_2+s_2-c_2)\left[\frac{\partial \tilde{x}_2}{\partial p_2}\frac{\partial p_2}{\partial r_2} -\frac{\partial \tilde{x}}{\partial p_1}\frac{\partial p_1}{\partial r_2}+\piff{\tilde{x}_2}{r_2}\right] -(1-\zeta_2)\Gamma^{\prime}_2(r_2)&=&0\label{99}
\end{eqnarray}
\end{subequations}
Inserting \eqref{foc1}, \eqref{foc2}, \eqref{hatx1r1} and \eqref{hatx2r2} into \eqref{98} and \eqref{99}, the first-order conditions in the first stage simplify to
\begin{subequations}
\begin{eqnarray}
    (1-\zeta_1)\Gamma^{\prime}_1(r_1)&=&\label{fuc1}\\
    &&\tilde{x}_1 
 \left[\left(\frac{\piff{\tilde{x}}{p_1}}{\piff{x_1^H}{p_1}+\piff{\tilde{x}}{p_1}}\right)\left(\piff{p_2}{r_1}- C_{r_1}^{I_1}(\tilde{x})\right) - \left(\frac{\piff{x_1^H}{p_1}}{\piff{x_1^H}{p_1}+\piff{\tilde{x}}{p_1}}\right) C_{r_1}^{I_1}(\alpha_1 x_1^H) \right] \nonumber \\
    (1-\zeta_2)\Gamma^{\prime}_2(r_2)&=&\label{fuc2}\\
    &&\tilde{x}_2\left[\left(\frac{-\piff{\tilde{x}}{p_2}}{\piff{x_2^H}{p_2}-\piff{\tilde{x}}{p_2}}\right)\left(\piff{p_1}{r_2}-C_{r_2}^{I_2}(1-\tilde{x})\right) -\left(\frac{\piff{x_2^H}{p_2}}{\piff{x_2^H}{p_2}-\piff{\tilde{x}}{p_2}} \right)C_{r_2}^{I_2}(\alpha_2 x_2^H)\right] \nonumber 
\end{eqnarray}
\end{subequations}
In the appendix \ref{derivationfb}, the first-best optimal policy levels are derived. They read:
\begin{subequations}
\begin{eqnarray}
    \tau&=&d\\
    s_1 &=& -\frac{\tilde{x}_1^*}{\piff{\tilde{x}_1}{p_1}}=(x_1^*+x ^*)\left[\Psi_1+\Psi\right]\label{s1h}\\
    s_2 &=& -\frac{\tilde{x}_2^*}{\piff{\tilde{x}_2}{p_2}}=(1-x^*+x_2^*)\left[\Psi_2+\Psi\right]\label{s2h}\\
    \zeta_1&=& 1-\frac{\tilde{x}_1^*
 \left[\left(\frac{\piff{\tilde{x}}{p_1}}{\piff{x_1^H}{p_1}+\piff{\tilde{x}}{p_1}}\right)\left(\piff{p_2}{r_1}- C_{r_1}^{I_1}(x^*)\right) - \left(\frac{\piff{x_1^H}{p_1}}{\piff{x_1^H}{p_1}+\piff{\tilde{x}}{p_1}}\right) C_{r_1}^{I_1}(\alpha_1 x_1^*) \right]}{\int_{0}^{x^*} -C_{r_1}^{I_1}(e_{\tilde{x},1}^*,r_1^*,\tilde{x})d\tilde{x} +  \int_{0}^{x_1^*} -C_{r_1}^{I_1}(e_{\tilde{x},1}^*,r_1^*,\alpha_1 \tilde{x})d\tilde{x}}\label{ressubs1hinterland}\\
    \zeta_2&=&1-\frac{\tilde{x}_2^*\left[\left(\frac{-\piff{\tilde{x}}{p_2}}{\piff{x_2^H}{p_2}-\piff{\tilde{x}}{p_2}}\right)\left(\piff{p_1}{r_2}-C_{r_2}^{I_2}(1-x^*)\right) -\left(\frac{\piff{x_2^H}{p_2}}{\piff{x_2^H}{p_2}-\piff{\tilde{x}}{p_2}} \right)C_{r_2}^{I_2}(\alpha_2 x_2^*)\right]}{\int_{x^*}^{1} -C_{r_2}^{I_2}(e_{\tilde{x},2}^*,r_2^*,1-\tilde{x})d\tilde{x} +\int_{0}^{x_2^*} -C_{r_2}^{I_2}(e_{\tilde{x},2}^*,r_2^*,\alpha_2 \tilde{x})d\tilde{x}}\label{ressubs2hinterland}
\end{eqnarray}
\end{subequations}
We can see that the subsidies can be split into an effect from the competing and  the Hinterland markets. For the R\&D subsidy, the factors $0<\frac{\piff{\tilde{x}}{p_1}}{\piff{\tilde{x_i}}{p_i}}<1$ and $0<\frac{\piff{x_i^H}{p_i}}{\piff{\tilde{x_i}}{p_i}}<1$, for $i=1,2$, map the correct shares onto the two market-related effects.
\subsubsection{Second-best regulation}
If output subsidies are unavailable and different R\&D subsidy rules are not under consideration, we propose the second-best policy comprising an emission tax of $\tau$ and a uniform subsidy $\zeta$ on research expenditure. The derivation of the policy rule can be found the appendix \ref{derviationsb}.
Defining
\begin{subequations}
    \begin{eqnarray*}
    T_{11}&:=&(\hat{x}+\hat{x}_1)\left[\left(\frac{\piff{\tilde{x}}{p_1}}{\piff{x_1^H}{p_1}+\piff{\tilde{x}}{p_1}}\right)\left(\piff{p_2}{r_1}- C_{r_1}^{I_1}(\hat{x})\right) - \left(\frac{\piff{x_1^H}{p_1}}{\piff{x_1^H}{p_1}+\piff{\tilde{x}}{p_1}}\right) C_{r_1}^{I_1}(\alpha_1 x_1^H)\right]\\
    T_{12}&:=&\int_0^{\hat{x}(\tau,\zeta)} C_{r_1}^{I_1} (e_{\tilde{x},1},r_1,\tilde{x}) d\tilde{x} +\int_0^{\hat{x}_1(\tau,\zeta)} C_{r_1}^{I_1} (e_{
 \tilde{x}^H,1},r_1,\alpha_1 \tilde{x}) d\tilde{x}\\
 T_{21}&:=&(1-\hat{x}+\hat{x_2})\left[\left(\frac{-\piff{\tilde{x}}{p_2}}{\piff{x_2^H}{p_2}-\piff{\tilde{x}}{p_2}}\right)\left(\piff{p_1}{r_2}-C_{r_2}^{I_2}(1-\hat{x})\right) -\left(\frac{\piff{x_2^H}{p_2}}{\piff{x_2^H}{p_2}-\piff{\tilde{x}}{p_2}} \right)C_{r_2}^{I_2}(\alpha_2 x_2^H)\right]\\
 T_{22}&:=&\int_{\hat{x}(\tau,\zeta)}^1 C_{r_2}^{I_2} (e_{\tilde{x},2},r_2,1-\tilde{x}) d\tilde{x} +\int_0^{\hat{x}_2(\tau,\zeta)} C_{r_2}^{I_2} (e_{\tilde{x}^H,2},r_2,\alpha_2 \tilde{x}) d\tilde{x}\\
 X_1&:=&\frac{\hat{x}(\tau,\zeta)+\hat{x}_1(\tau,\zeta)}{\piff{\tilde{x}_1}{p_1}}\left(\piff{\hat{x}}{\tau}+\piff{\hat{x}_1}{\tau}\right)+\frac{1-\hat{x}(\tau,\zeta)+\hat{x}_2(\tau,\zeta)}{\piff{\tilde{x}_2}{p_2}}\left(\piff{\hat{x}_2}{\tau}-\piff{\hat{x}}{\tau}\right)\\
 X_2&:=&\frac{\hat{x}(\tau,\zeta)+\hat{x}_1(\tau,\zeta)}{\piff{\tilde{x}_1}{p_1}}\left(\piff{\hat{x}}{\zeta}+\piff{\hat{x}_1}{\zeta}\right)+\frac{1-\hat{x}(\tau,\zeta)+\hat{x}_2(\tau,\zeta)}{\piff{\tilde{x}_2}{p_2}}\left(\piff{\hat{x}_2}{\zeta}-\piff{\hat{x}}{\zeta}\right)
\end{eqnarray*}
\end{subequations}

we obtain a second-best policy mix as follows:
\begin{eqnarray}
    \tau^{SB}&=&d+\frac{X_1}{\piff{E}{\tau}}+\left[\frac{T_{11}\left(\piff{E}{\tau}X_2-\piff{E}{\zeta}X_1\right)+\left(T_{11}T_{22}-T_{12}T_{21}\right)\left(\piff{E}{\tau}\piff{r_2}{\zeta}-\piff{E}{\zeta}\piff{r_2}{\tau}\right)}{\piff{E}{\zeta}\left(T_{11} \piff{r_1}{\tau}+ T_{21} \piff{r_2}{\tau}\right)-\piff{E}{\tau}\left(T_{11} \piff{r_1}{\zeta}+T_{21} \piff{r_2}{\zeta}\right)}\right]\frac{\piff{r_1}{\tau}}{\piff{E}{\tau}}\nonumber\\
    &+&\left[\frac{T_{21}\left(\piff{E}{\tau}X_2-\piff{E}{\zeta}X_1\right)+\left(T_{11}T_{22}-T_{12}T_{21}\right)\left(\piff{E}{\zeta}\piff{r_1}{\tau}-\piff{E}{\tau}\piff{r_1}{\zeta}\right)}{\piff{E}{\zeta}\left(T_{11} \piff{r_1}{\tau}+ T_{21} \piff{r_2}{\tau}\right)-\piff{E}{\tau}\left(T_{11} \piff{r_1}{\zeta}+T_{21} \piff{r_2}{\zeta}\right)}\right]\frac{\piff{r_2}{\tau}}{\piff{E}{\tau}}\label{hintermixsbtau}
\end{eqnarray}
and
\begin{eqnarray}
    \zeta^{SB}&=&1-\frac{\piff{E}{\zeta}\left(T_{11} \piff{r_1}{\tau}+ T_{21} \piff{r_2}{\tau}\right)-\piff{E}{\tau}\left(T_{11} \piff{r_1}{\zeta}+T_{21} \piff{r_2}{\zeta}\right)}{\piff{E}{\tau}X_2-\piff{E}{\zeta}X_1+\piff{E}{\tau}\left(T_{12}\piff{r_1}{\zeta}+T_{22}\piff{r_2}{\zeta}\right)-\piff{E}{\zeta}\left(T_{12}\piff{r_1}{\tau}+T_{22}\piff{r_2}{\tau}\right)}\label{hintermixsbsubs}
\end{eqnarray}
Thus, if the effects on the competed market in $X_1$ (almost) cancel each other out due to symmetry, the term $\frac{X_1}{\piff{E}{\tau}}$ tends to increase the second-best tax above marginal damage. Moreover, if the effect of the policy instruments on R\&D is symmetric for upstream-industry 1 and 2, i.e. $\piff{r_1}{\tau}\approx\piff{r_2}{\tau}$ and $\piff{r_1}{\zeta}\approx\piff{r_2}{\zeta}$, the second-best policy mix formulas simplify. In that case, they boil down to 
\begin{eqnarray}
    \tau^{SB}&\approx& d+\frac{X_2-X_1}{\piff{E}{\zeta}-\piff{E}{\tau}}\\
    \zeta^{SB}&\approx& 1-\frac{2 T_{11}}{\frac{\piff{E}{\tau}X_2-\piff{E}{\zeta}X_1}{\left(\piff{E}{\zeta}\piff{r}{\tau}-\piff{E}{\tau}\piff{r}{\zeta}\right)}-2T_{12}}
\end{eqnarray}
Note that even in a symmetric equilibrium, it holds that $X_2-X_1 \approx \frac{2(\hat{x}+\hat{x}_1)}{\piff{\tilde{x}_1}{p_1}}\left[\piff{\hat{x}_1}{\zeta}-\piff{\hat{x}_1}{\tau}\right]$ is not equal to zero in general. This is due to the areas where firms have monopoly power in the hinterland model. Therefore, in general and in contrast to the duopoly model, even in a symmetric equilibrium the second-best tax is not equal to marginal damage and the second-best uniform R\&D subsidy not equal to its first-best counterpart. 
\begin{bem}
    If an emission tax is the only available instrument, write for short $\hat{x}(\tau)$ instead of $\hat{x}(\tau,0)$ and so on. Then the second-best solution reads
\begin{eqnarray}
        \tau^{SB} &=& d + \frac{(\hat{x}+\hat{x}_1)}{\piff{\tilde{x}_1}{p_1}}\frac{(\hat{x}^{\prime}(\tau)+\hat{x}_1^{\prime}(\tau))}{E^{\prime}(\tau)} + \frac{(1-\hat{x}+\hat{x}_2)}{\piff{\tilde{x}_2}{p_2}}\frac{(\hat{x}_2^{\prime}(\tau)-\hat{x}^{\prime}(\tau))}{E^{\prime}(\tau)}\label{taxformulasbh}\\
        &+&\left[\int_{0}^{\hat{x}(\tau)} C_{r_1}^{I_1}(e_{\tilde{x},1},r_1,\tilde{x})d\tilde{x} +(\hat{x}(\tau)+\hat{x}_1(\tau))\left(\frac{\piff{\tilde{x}}{p_1}}{\piff{x_1^H}{p_1}+\piff{\tilde{x}}{p_1}}\right)\left(\piff{p_2}{r_1}-C_{r_1}^{I_1}(\hat{x})\right) \right.\nonumber\\
    &+&  \left.\int_{0}^{\hat{x}_1(\tau)} C_{r_1}^{I_1}(e_{\tilde{x}^H,1},r_1,\alpha_1 \tilde{x})d\tilde{x}-(\hat{x}(\tau)+\hat{x}_1(\tau))\left(\frac{\piff{x_1^H}{p_1}}{\piff{x_1^H}{p_1}+\piff{\tilde{x}}{p_1}}\right) C_{r_1}^{I_1}(\alpha_1 \hat{x}_1)\right]\frac{r_1^{\prime}(\tau)}{E^{\prime}(\tau)} \nonumber\\
        &+&\left[\int_{\hat{x}(\tau)}^{1} -C_{r_2}^{I_2}(e_{\tilde{x},2},r_2,1-\tilde{x})d\tilde{x} +(1-\hat{x}(\tau)+\hat{x}_2(\tau)) \left(\frac{-\piff{\tilde{x}}{p_2}}{\piff{x_2^H}{p_2}-\piff{\tilde{x}}{p_2}}\right)\left(\piff{p_1}{r_2}-C_{r_2}^{I_2}(1-\hat{x})\right)\right.\nonumber\\
    &+&\left.\int_{0}^{\hat{x}_2(\tau)} -C_{r_2}^{I_2}(e_{\tilde{x}^H,2},r_2,\alpha_2 \tilde{x})d\tilde{x}-(1-\hat{x}(\tau)+\hat{x}_2(\tau))\left(\frac{\piff{x_2^H}{p_2}}{\piff{x_2^H}{p_2}-\piff{\tilde{x}}{p_2}} \right)C_{r_2}^{I_2}(\alpha_2 \hat{x}_2)\right]\frac{r_2^{\prime}(\tau)}{E^{\prime}(\tau)}\nonumber
\end{eqnarray}
\end{bem}
The derivation can be also found in the appendix \ref{derviationsb}. If the comparative static effects of a tax increase go in the "normal" direction (for conditions see chapter \ref{comp_stat-tax_hinterland} of the supplementary material, i.e. \ $\hat{x}^{\prime}(\tau)+\hat{x}_1^{\prime}(\tau)>0$, $\hat{x}_2^{\prime}(\tau)-\hat{x}^{\prime}(\tau) > 0$, $r_1^{\prime}(\tau)>0$, $r_2^{\prime}(\tau) > 0,$ and $E^{\prime}(\tau)<0$), and if the first-best research subsidies in \eqref{ressubs1hinterland} and \eqref{ressubs2hinterland} are positive, the second-best emission tax exceeds marginal damage. However, we observe that the existence of the hinterland leads the regulator to increase the tax via the terms $\tilde{x}_i^{\prime}(\tau)$, and the hinterlands impact on the optimal technology subsidy.
\subsubsection{Comparative statics due to a tax increase}
\label{comp_stat-tax_hinterland}
Overall, the hinterland model combines the model of a monopolistic upstream firm with that of duopolistic upstream competition. Therefore, the following statement is a simple consequence from proposition %\ref{comp-stat-monopoly} 
3.2 and 4.7. %\ref{comp-static-tau-prop}.
\begin{prop}
    If the up-stream R\&D firms and hinterlands are symmetric and $C_{e_i x}^{I_i}, C_{r_i x}^{I_i}$ as well as $D_i^{erx}, D_{H_i}^{erx}$ are sufficiently small for $i=1,2$, we obtain:
    \begin{eqnarray}
              \frac{d p_1}{d \tau} &=&  \frac{d p_2}{d \tau} > 0 \nonumber\\
         \frac{d r_1}{d \tau} &=&  \frac{d r_2}{d \tau} > 0   \nonumber\\
         \frac{d\hat{x}_1}{d\tau}&=&\frac{d\hat{x}_2}{d\tau} >0\nonumber\\
         \frac{d E}{d \tau} &<& 0\nonumber
    \end{eqnarray} 
\end{prop}

\section{Appendix for the supplementary material}
%\subsection{Interior solutions of social cost minimization}
\subsection{Derivation of \eqref{case_a=2}}\label{a1app}
Solving \eqref{foc_x2} and \eqref{foc_r2} for $a=2$ we obtain two solutions:
\begin{subequations}
\begin{eqnarray}
x_1 &=& \frac{d^2-\sqrt{d^4-4cf\gamma^2}}{2f \gamma}, \qquad
r_1 =\frac{d^3-d\sqrt{d^4-4cf\gamma^2}}{2f \gamma^2} \label{sol_r1} \\
x_2 &=& \frac{d^2+\sqrt{d^4-4cf\gamma^2}}{2f \gamma}, \qquad
r_2 =\frac{d^3+d\sqrt{d^4-4cf\gamma^2}}{2f \gamma^2} \label{sol_r2}
\end{eqnarray}
\end{subequations}
Real value solutions only exist if $d^4 \geq 4cf\gamma^2$, or equivalently,
$f \leq \frac{d^4}{4c\gamma^2}:=\bar{f}$,
i.e.\ if the marginal damage is sufficiently high, or the cost parameter $f$ is no greater than $\bar{f}$. 
The Hessian now reads
\begin{equation*}
	H=\left(\begin{matrix}
	2fx & -d\\
		-d & \gamma
	\end{matrix}\right)
\end{equation*}
and its determinant is positive if $f2x \gamma > d^2$, which implies
\begin{equation*} \label{SEC2}
		f > \frac{d^2}{2x \gamma} \geq \frac{d^2}{2 \gamma} := \underline{f}
\end{equation*}
Note that in order to obtain an interior solution, the fixed costs must also not be too small.
Substituting the solutions into the second-order conditions we obtain:
$|H(x_1,r_1)|=-\sqrt{d^4 - 4 c f \gamma^2}<0$ and $|H(x_2,r_2)|= \sqrt{d^4 - 4 c f \gamma^2}>0$.
So only the second solution \eqref{sol_r2} yields a social cost minimum.
Now we consider $x_2$ as a function of $f$. Solving
\begin{equation}
    x_2=\frac{d^2+\sqrt{d^4-4cf\gamma^2}}{2f \gamma} =1\nonumber
\end{equation}
for $f$, we obtain 
$f= d^2/\gamma -c $. This, together with the arguments above, implies \eqref{case_a=2}. 
\subsection{Proof of Proposition \ref{hintcompstatpirj}}\label{proofcshint}
Inserting the equilibrium prices $p_1(r_1,r_2)$ and  $p_2(r_1,r_2)$ into the the first-order conditions \eqref{foc1}, \eqref{foc2} 
 and differentiating with respect to the research efforts $r_1$ and $r_2$ we end up with the following conditions in matrix-form:
\begin{eqnarray}\label{mat2}
     &&\begin{bmatrix}
  2 \frac{\partial\tilde{x}_1}{\partial p_1}+(p_1+s_1-c_1)\frac{\partial^2 \tilde{x}_1}{\partial p_1^2} & \frac{\partial \tilde{x}}{\partial p_2}+ (p_1+s_1-c_1)\frac{\partial^2 \tilde{x}}{\partial p_1\partial p_2}\\
      \frac{\partial \tilde{x}}{\partial p_2}- (p_2+s_2-c_2)\frac{\partial^2 \tilde{x}}{\partial p_1\partial p_2} &  2 \frac{\partial\tilde{x}_2}{\partial p_2}+(p_2+s_2-c_2)\frac{\partial^2 \tilde{x}_2}{\partial p_2^2} \\
  \end{bmatrix}
  \begin{bmatrix}
      \frac{\partial p_1}{\partial r_i}\\
       \frac{\partial p_2}{\partial r_i}
  \end{bmatrix} \nonumber\\&=& 
   \begin{bmatrix}
      -\frac{\partial\tilde{x}_1}{\partial r_i}-(p_1+s_1-c_1)\frac{\partial^2 \tilde{x}_1}{\partial p_1\partial r_i}\\
     -\frac{\partial\tilde{x}_2}{\partial r_i}-(p_2+s_2-c_2)\frac{\partial^2 \tilde{x}_2}{\partial p_2\partial r_i}\\
  \end{bmatrix}
  \end{eqnarray}
for $i=1,2$.

Denote the 2x2 matrix in \eqref{mat2} by $M^H$ and recall that \begin{eqnarray*}
    \Theta(\tilde{x})&=&C_{xx}^{I_1}-C_{(1-x)(1-x)}^{I_2}+F_1^{''}(\tilde{x})-F_2^{''}(1-\tilde{x})\\
    \Psi&=&C_x^{I_1}+C_{(1-x)}^{I_2}+F_1^{\prime}(\tilde{x})+F_2^{\prime}(1-\tilde{x})\\
    D_i^{erx}&=&C_{r_ix_i}^{I_i}C_{e_ie_i}^{I_i}-C_{e_i x_i}^{I_i} C_{e_i r_i}^{I_i}
\end{eqnarray*}
for $i=1,2$. 

Further, for the following calculations, we define 
\begin{eqnarray*}
     \Theta^{i}(\alpha_i x_i^H):&=& C_{x_i^Hx_i^H}^{I_i}(\alpha_i x_i^H)+F_i^{\prime\prime}(\alpha_i x_i^H)\\
    \Psi_i:&=& \alpha_i(C_{x_i^H}^{I_{i}}(\alpha_i x_i^H)+F_{i}^{\prime}(\alpha_i  x_i^H))\\D_{H_i}^{erx}:&=&C_{r_ix_i^H}^{I_i}(\alpha_i x_i^H)C_{e_ie_i}^{I_i}(\alpha_i x_i^H)-C_{e_ix_i^H}^{I_i}(\alpha_i x_i^H)C_{e_ir_i}^{I_i}(\alpha_i x_i^H)
\end{eqnarray*}
for $i=1,2$.

Using the results of the duopoly problem, we calculate several partial derivatives. The partial derivatives with respect to technology levels are
\begin{eqnarray}
    \piff{\tilde{x}_1}{r_1}&=&-\frac{C_{r_1}^{I_1}(e_{\tilde{x},1},r_1,\tilde{x})}{\Psi} -\frac{C_{r_1}^{I_1} (e_{x_1^H,1},r_1,\alpha_1 x_1^H)}{\Psi_1}>0 \label{hatx1r1}\\
    \piff{\tilde{x}_1}{r_2}&=&\frac{C_{r_2}^{I_2}}{\Psi} <0 \nonumber\\
    \piff{\tilde{x}_2}{r_1}&=&\frac{C_{r_1}^{I_1}}{\Psi} <0 \nonumber\\
    \piff{\tilde{x}_2}{r_2}&=&-\frac{C_{r_2}^{I_2}(e_{\tilde{x},2},r_2,1-\tilde{x})}{\Psi}-\frac{C_{r_2}^{I_2}(e_{x_2^H,2},r_2,\alpha_2 x_2^H)}{\Psi_2} >0 \label{hatx2r2}
    \end{eqnarray}
    
   In the following we will use the short from $C^{I_i}(x)$ meaning $C^{I_i}(e_x,r_i,x)$. The second-order partial derivatives with respect to prices read
    \begin{eqnarray}
    \frac{\partial^2\tilde{x}_1}{\partial p_1 \partial p_2}&=&-\frac{\partial^2\tilde{x}_2}{\partial p_1\partial p_2}=\frac{\Theta(\tilde{x})}{\Psi^3}\label{dxhatdp1p2}\\
    \frac{\partial^2\tilde{x}_1}{\partial p_1^2}&=&-\frac{\alpha_1 \Theta^1(\alpha_1x_1^H)}{\Psi_1^3} -\frac{\Theta(\tilde{x})}{\Psi^3}\label{dx1hatdp12}\\
    \frac{\partial^2\tilde{x}_2}{\partial p_2^2}&=&-\frac{\alpha_2  \Theta^2(\alpha_2x_2^H)}{\Psi_2^3}+\frac{\Theta(\tilde{x})}{\Psi^3}\label{dx2hatdp22}
    \end{eqnarray}
    
   Further, the mixed second-order partial derivatives are given by
    \begin{eqnarray}
    \frac{\partial^2\tilde{x}_1}{\partial p_1 \partial r_1}&=& \frac{\alpha_1\left(\Theta^1(\alpha_1 x_1^H)\piff{x_1}{r_1}+D_{H_1}^{erx}\right)}{\Psi_1^2}+\frac{\Theta(\tilde{x})\piff{\tilde{x}}{r_1}+D_1^{erx}}{\Psi^2}\\
    \frac{\partial^2\tilde{x}_2}{\partial p_2\partial r_2}&=&\frac{\alpha_2\left(\Theta^2(\alpha_2 x_2^H)\piff{x_2}{r_2}+D_{H_2}^{erx}\right)}{\Psi_2^2}+\frac{\Theta(\tilde{x})\piff{\tilde{x}}{r_2}+D_2^{er(1-x)}}{\Psi^2}\\
    \frac{\partial^2\tilde{x}_1}{\partial p_1 \partial r_2}&=&\frac{\Theta(\tilde{x})\piff{\tilde{x}}{r_2}+D_2^{er(1-x)}}{\Psi^2}\\
    \frac{\partial^2\tilde{x}_2}{\partial p_2\partial r_1}&=&\frac{\Theta(\tilde{x})\piff{\tilde{x}}{r_1}+D_1^{erx}}{\Psi^2}
\end{eqnarray}
Now, the following equality holds:
\begin{subequations}
\begin{eqnarray}
    det(M^H)&=&\left[2 \frac{\partial\tilde{x}_1}{\partial p_1}+(p_1+s_1-c_1)\frac{\partial^2 \tilde{x}_1}{\partial p_1^2} \right]\left[2 \frac{\partial\tilde{x}_2}{\partial p_2}+(p_2+s_2-c_2)\frac{\partial^2 \tilde{x}_2}{\partial p_2^2}\right]\label{upperprod}\\
    &-& \left[\piff{\tilde{x}}{p_1}+(p_1+s_1-c_1)\piff{^2\tilde{x}}{p_1^2}\right]\left[\piff{\tilde{x}}{p_1}-(p_2+s_2-c_2)\piff{^2\tilde{x}}{p_1^2}\right]\label{detmh}
\end{eqnarray}
\end{subequations}
While the upper product in \eqref{upperprod} clearly is positive by the upstream firms second-order conditions of profit maximization, the product in \eqref{detmh} is ambiguous in general.

To simplify the calculations, we will assume that firms are completely symmetric in the following: the market is shared equally $(\tilde{x}=\frac{1}{2})$ and we have $x_1=x_2$. In particular it holds that $\Theta(\tilde{x})=\Theta\left(\frac{1}{2}\right)=0.$ By \eqref{dx1hatdp12} and \eqref{dx2hatdp22} one can then 
conclude that $det(M^H)>0$.

Cramer's rule thus yields
\begin{subequations}
\begin{eqnarray}
det \left(M^H\right) \piff{p_1}{r_1}&=& \frac{C_{r_1}^{I_1}(\tilde{x})}{\Psi} \left(2\piff{x_2}{p_2}-\piff{\tilde{x}}{p_2}-(p_2+s_2-c_2)\frac{\alpha_2\Theta^2(\alpha_2x_2^H)}{\Psi_2^3}\right)\nonumber\\
&+&\frac{C_{r_1}^{I_1}(\alpha_1 x_1^H)}{\Psi_1}\left(1+\frac{(p_1+s_1-c_1)\alpha_1\Theta^1(\alpha_1 x_1^H)}{\Psi_1^2}\right)\nonumber\\
&&\left(2\piff{\tilde{x}_2}{p_2}-\frac{(p_2+s_2-c_2)\alpha_2\Theta^2(\alpha_2 x_2^H)}{\Psi_2^3}\right)\nonumber\\
&+& \frac{D_1^{erx}}{\Psi^2}\left(\frac{p_2+s_2-c_2}{\Psi}-(p_1+s_1-c_1)\left(2\piff{\tilde{x}_2}{p_2}-(p_2+s_2-c_2)\frac{\alpha_2\Theta^2(\alpha_2 x_2^H)}{\Psi_2^3}\right)\right)\nonumber\\
&-&\frac{D_{H_1}^{erx}}{\Psi_1^2} \alpha_1 (p_1+s_1-c_1) \left(2\piff{\tilde{x}_2}{p_2}-(p_2+s_2-c_2)\frac{\alpha_2\Theta^2(\alpha_2x_2^H)}{\Psi_2^3}\right)\label{hintip1r1}\\
 det(M^H) \piff{p_2}{r_1}&=& -\frac{C_{r_1}^{I_1}(\tilde{x})}{\Psi} \left(2\piff{x_1}{p_1}+\piff{\tilde{x}}{p_1}-(p_1+s_1-c_1)\frac{\alpha_1\Theta^1(\alpha_1 x_1^H)}{\Psi_1^3}\right)\nonumber\\
 &-& \frac{C_{r_1}^{I_1}(\alpha_1 x_1^H)}{\Psi_1}\left(1+\frac{(p_1+s_1-c_1)\alpha_1\Theta^1(\alpha_1 x_1^H)}{\Psi_1^2}\right)\piff{\tilde{x}}{p_2}\nonumber\\
&+&\frac{D_1^{erx}}{\Psi^2}\left[\frac{p_1+s_1-c_1}{\Psi}-(p_2+s_2-c_2)\left(2\piff{\tilde{x}_1}{p_1}-(p_1+s_1-c_1)\frac{\alpha_1\Theta^1(\alpha_1 x_1^H)}{\Psi_1^3}\right)\right]\nonumber\\
&+& \frac{D_{H_1}^{erx}}{\Psi_1^2} \frac{(p_1+s_1-c_1)\alpha_1}{\Psi}\label{hinticrossr1}
\end{eqnarray}
\end{subequations}

Hence if $|D_1^{erx}|$ and $|D_{H_1}^{erx}|$ are small, $\piff{p_1}{r_1}$ is positive. Furthermore the existence of the hinterland firms increases both comparative statics effects. This effect is larger for the own price than for the other firm's price. This is due to the fact that upstream firm number 2 can only indirectly gain from the monopolistic situation of upstream firm 1. It is yet unclear if this effect can be large enough for the cross-price effect $\piff{p_2}{r_1}$ to become positive. If $|D_1^{erx}|$ and $|D_{H_1}^{erx}|$ are small, the cross effect is approximately given by 

 \begin{eqnarray}
     det(M^H) \piff{p_2}{r_1}&\approx&\left(\frac{1}{\Psi_1}+\frac{(p_1+s_1-c_1)\alpha_1\Theta^1(\alpha_1 x_1^H)}{\Psi_1^3}\right)\left(C_{r_1}^{I_1}(\tilde{x})-C_{r_1}^{I_1}(\alpha_1 x_1^H)\right) \nonumber\\
     &+&C_{r_1}^{I_1}(\tilde{x})\left(\frac{1}{\Psi}+\frac{1}{\Psi_1}\right)\nonumber
 \end{eqnarray}
Because the second term clearly is negative, the overall effect is negative as long as $|C_{r_1}^{I_1}(\alpha_1 x_1^H)|$ is small enough. A change in sign occurs around an allocation where
\begin{equation*}
    \Big|\frac{C_{r_1}^{I_1}(\tilde{x})-C_{r_1}^{I_1}(\alpha_1 x_1^H)}{C_{r_1}^{I_1}(\tilde{x})}\Big| \geq \frac{1+\frac{\Psi_1}{\Psi}}{1+\frac{(p_1+s_1-c_1)\alpha_1 \Theta^1(\alpha_1 x_1^H)}{\Psi_1^2}}
\end{equation*}
holds.

  Analogously we can derive the comparative statics effects following an increase of $r_2$. We omit these calculations due to model symmetry. This completes the proof.
\subsection{Derivation of the first-best policy for the hinterland model}\label{derivationfb}
The social costs in this model are determined by costs of those firms who adopt technology 1 or 2 and of those at the boundaries of the hinterland which decide not to adopt any technology. They read as follows:
\begin{eqnarray}
     &&SC = (2-x_1-x_2)C^0(e_0)+\int_{0}^{x^{I}} \left[C^{I_1}(e_{\tilde{x},1}, r_1, \tilde{x}) +c_1 +F_1(\tilde{x}) \right]d\tilde{x} \nonumber\\&+&\int_{0}^{x_1} \left[C^{I_1}(e_{\tilde{x}^H,1}, r_1, \alpha_1 \tilde{x}) +c_1 +F_1(\alpha_1 \tilde{x}) \right]d\tilde{x}
    \nonumber\\&+& \int_{x^{I}}^{1} \left[C^{I_2}(e_{ \tilde{x},2}, r_2, 1-\tilde{x}) +c_2 +F_2( 1-\tilde{x}) \right]d\tilde{x}
   \label{hintisocos} \\ &+& \int_{0}^{x_2} \left[C^{I_2}(e_{\tilde{x}^H,2}, r_2, \alpha_2 \tilde{x}) +c_2 +F_2(\alpha_2 \tilde{x}) \right]d\tilde{x} +d \left[ (2-x_1-x_2)e_0  + \right.\nonumber\\
    &&\left.\int_{0}^{x^{I}} e_{\tilde{x},1} d\tilde{x} +\int_{0}^{x_1} e_{\tilde{x}^H,1} d\tilde{x} + \int_{x^{I}}^{1} e_{\tilde{x},2} d\tilde{x} + \int_{0}^{x_2} e_{\tilde{x}^H,2} d\tilde{x} \right] + \Gamma_1(r_1) + \Gamma_2(r_2)\nonumber
\end{eqnarray}
 Hence the first-order conditions for a socially optimal choice of the endogenous variables $x_1^*,x_2^*,x^*, e_0^*, e_{x,1}^*, e_{x,2}^*, e_{x^H,1}^*, e_{x^H,2}^*, r_1^*,r_2^*$ are
 \begin{subequations}
\begin{eqnarray}
   -C_e&=&d\\        \Gamma_1^{\prime}(r_1^*)&=&\int_{0}^{x^*} -C_{r_1}^{I_1}(e_{\tilde{x},1}^*,r_1^*,\tilde{x})d\tilde{x} +  \int_{0}^{x_1^*} -C_{r_1}^{I_1}(e_{\tilde{x}^H,1}^*,r_1^*,\alpha_1 \tilde{x})d\tilde{x}\label{sog11}\\
        \Gamma_2^{\prime}(r_2^*)&=&\int_{x^*}^{1} -C_{r_2}^{I_2}(e_{\tilde{x},2}^*,r_2^*,1-\tilde{x})d\tilde{x} +\int_{0}^{x_2^*} -C_{r_2}^{I_2}(e_{\tilde{x}^H,2}^*,r_2^*,\alpha_2 \tilde{x})d\tilde{x}\label{sog12}\\
        &&C^{I_1}(e_{x^*,1}^*,r_1^*,{x^*})+c_1+F_1(x^*)+d e_{x^*,1}^*\nonumber\\
        &=&C^{I_2}(e_{x^*,2},r_2^*,1-x^*)+c_2+ F_2(1-x^*)+ d e_{x^*,2}^*\label{indiffhat}\\
        C^0(e_0^*)+de_0^*&=&C^{I_1}(e_{x_1^*,1}^*,r_1^*,\alpha_1 x_1^*)+c_1+F_1(\alpha_1 x_1^*)+d e_{x_1^*,1}^*\label{indiff1}\\
       C^0(e_0^*)+d e_0^*&=&C^{I_2}(e_{x_2^*,2}^*,r_2^*,\alpha_2 x_2^*)+c_2+F_2(\alpha_2 x_2^*)+d e_{ x_2^*,2}^*\label{indiff2}
\end{eqnarray}
\end{subequations}

Interpretations are similar to the previous cases, where we examined the social optimum. The lower three equations \eqref{indiffhat} to \eqref{indiff2} indicate that at all indifference points where the social costs of taking one of the two possible decisions equals the social cost as consequence of taking the other of the two possible options.
Comparing those with the conditions for profit maximization we can now determine the first-best optimal subsidies $s_1,s_2$ on output and $\zeta_1$ and $ \zeta_2$ on research expenditure. 

Now, clearly the first-best optimal tax is again the pigouvian tax $\tau=d$. Next, recall that the indifference conditions for the hinterland firms are given by 
\begin{equation}\label{hinterlandindiff}
   C^{I_{i}}(e_{x_i^H,i}(\tau),r_i,\alpha_i x_i^H) + F_{i}(\alpha_i x_i^H) + p_i + \tau e_{x_i^H,i}(\tau) =  C^0 (e_0(\tau)) + \tau e_0(\tau)
\end{equation}
$i=1,2.$ On the competed market, the indifferent downstream firm is characterized by
\begin{eqnarray}
     &&C^{I_1}(e_{x,1}(\tau),r_1,x)+F_1(x)+p_1+\tau e_{x,1}(\tau) \nonumber\\
     &=& C^{I_2}(e_{x,2}(\tau),r_2,1-x)+F_2(1-x)+p_2+\tau e_{x,2}(\tau)\label{inteq}
\end{eqnarray}
If we compare those indifference conditions to those in \eqref{indiffhat} to \eqref{indiff2} of the social planner, we see that in equilibrium $p_1=c_1$ and $p_2=c_2$ must hold. Thus, in contrast to the duopoly model, both upstream firms have to be fully subsidized in order to obtain the socially optimal amount of adoption regarding the exclusive customers.

Analyzing the profit maximizing first-order conditions \eqref{foc1} and \eqref{foc2}, we obtain \eqref{s1h} and \eqref{s2h}.
For the first-best optimal research expenditure subsidies we compare\eqref{sog11} with \eqref{fuc1} and \eqref{sog12} with \eqref{fuc2} to obtain \eqref{ressubs1hinterland} and \eqref{ressubs2hinterland}.
\subsection{Derivation of the second-best policies for the hinterland model}\label{derviationsb}
Consider the social cost \eqref{hintisocos} as function of $\tau$ and $\zeta$.
Redefine the demands $\hat{x}(\tau, \zeta):=\tilde{x}(p_1(\tau, \zeta),p_2(\tau, \zeta);r_1(\tau, \zeta),r_2(\tau, \zeta);\tau), \hat{x}_1:=x_1(p_1(\tau, \zeta),r_1(\tau, \zeta);\tau)$ and so on as functions of the tax rate and the research expenditure subsidy. Then, using the indifference conditions of the duopoly \eqref{inteq}, the indifference conditions of the hinterlands \eqref{hinterlandindiff} as well as the optimality condition of the downstream firms $-C_e=\tau$, the first order condition with respect to $\tau$ reads:
\begin{subequations}
\begin{eqnarray}
        0&=& (d-\tau)\left[(2-\hat{x}_1(\tau,\zeta)-\hat{x}_2(\tau,\zeta))e_0^{\prime}(\tau)+\int_0^{\hat{x}_1(\tau,\zeta)} \piff{e_{\tilde{x}^H,1}}{\tau}d\tilde{x} +\int_0^{\hat{x}(\tau,\zeta)} \piff{e_{\tilde{x},1}}{\tau}d\tilde{x}\right. \nonumber\\
        &+&\left.  \int_0^{\hat{x}_2(\tau,\zeta)} \piff{e_{\tilde{x}^H,2}}{\tau}d\tilde{x}+\int_{\hat{x}(\tau,\zeta)}^{1} \piff{e_{\tilde{x},2}}{\tau}d\tilde{x} \right] \nonumber\\
        &+&\left[(p_2-c_2)+(c_1-p_1)+(d-\tau)(e_{\hat{x},1}(\tau,\zeta)-e_{\hat{x},2}(\tau,\zeta))\right] \piff{\hat{x}}{\tau}\label{taxeq01}\\
        &+&\left[(c_1-p_1)+(d-\tau)(e_{\hat{x}_1,1}(\tau,\zeta)-e_0(\tau)\right] \piff{\hat{x}_1}{\tau}\nonumber\\
        &+&\left[(c_2-p_2)+(d-\tau)(e_{\hat{x}_2,2}(\tau,\zeta)-e_0(\tau)\right] \piff{\hat{x}_2}{\tau} \nonumber\\&+& \left[\int_0^{\hat{x}(\tau,\zeta)} C_{r_1}^{I_1} (e_{\tilde{x},1},r_1,\tilde{x}) d\tilde{x} +\int_0^{\hat{x}_1(\tau,\zeta)} C_{r_1}^{I_1} (e_{
 \tilde{x}^H,1},r_1,\alpha_1 \tilde{x}) d\tilde{x} +\Gamma_1^{\prime}(r_1(\tau,\zeta))\right]\piff{r_1}{\tau}\nonumber\\
        &+&\left[\int_{\hat{x}(\tau,\zeta)}^1 C_{r_2}^{I_2} (e_{\tilde{x},2},r_2,1-\tilde{x}) d\tilde{x} +\int_0^{\hat{x}_2(\tau,\zeta)} C_{r_2}^{I_2} (e_{\tilde{x}^H,2},r_2,\alpha_2 \tilde{x}) d\tilde{x} +\Gamma_2^{\prime}(r_2(\tau,\zeta))\right]\piff{r_2}{\tau}\nonumber
\end{eqnarray}
Because the emission level $e_0$ is independent of $\zeta$, the corresponding first-order condition with respect to $\zeta$ is given by
\begin{eqnarray}
        0&=& (d-\tau)\left[\int_0^{\hat{x}_1(\tau,\zeta)} \piff{e_{\tilde{x}^H,1}}{\zeta}d\tilde{x} +\int_0^{\hat{x}(\tau,\zeta)} \piff{e_{\tilde{x},1}}{\zeta}d\tilde{x}+  \int_0^{\hat{x}_2(\tau,\zeta)} \piff{e_{\tilde{x}^H,2}}{\zeta}d\tilde{x}+\int_{\hat{x}(\tau,\zeta)}^{1} \piff{e_{\tilde{x},2}}{\zeta}d\tilde{x} \right] \nonumber\\
        &+&\left[(p_2-c_2)+(c_1-p_1)+(d-\tau)(e_{\hat{x},1}(\tau,\zeta)-e_{\hat{x},2}(\tau,\zeta))\right] \piff{\hat{x}}{\zeta}\nonumber\\
        &+&\left[(c_1-p_1)+(d-\tau)(e_{\hat{x}_1,1}(\tau,\zeta)-e_0(\tau)\right] \piff{\hat{x}_1}{\zeta}\nonumber\\
        &+&\left[(c_2-p_2)+(d-\tau)(e_{\hat{x}_2,2}(\tau,\zeta)-e_0(\tau)\right] \piff{\hat{x}_2}{\zeta} \label{subsidyeq}\\&+& \left[\int_0^{\hat{x}(\tau,\zeta)} C_{r_1}^{I_1} (e_{\tilde{x},1},r_1,\tilde{x}) d\tilde{x} +\int_0^{\hat{x}_1(\tau,\zeta)} C_{r_1}^{I_1} (e_{
 \tilde{x}^H,1},r_1,\alpha_1 \tilde{x}) d\tilde{x} +\Gamma_1^{\prime}(r_1(\tau,\zeta))\right]\piff{r_1}{\zeta}\nonumber\\
        &+&\left[\int_{\hat{x}(\tau,\zeta)}^1 C_{r_2}^{I_2} (e_{\tilde{x},2},r_2,1-\tilde{x}) d\tilde{x} +\int_0^{\hat{x}_2(\tau,\zeta)} C_{r_2}^{I_2} (e_{\tilde{x}^H,2},r_2,\alpha_2 \tilde{x}) d\tilde{x} +\Gamma_2^{\prime}(r_2(\tau,\zeta))\right]\piff{r_2}{\zeta}\nonumber
\end{eqnarray}
\end{subequations}
The derivative for total emissions with respect to $\tau$ and $\zeta$ reads:
\begin{subequations}
\begin{eqnarray}
    \piff{E}{\tau}&=& (2-\hat{x}_1(\tau)-\hat{x}_2(\tau))e_0^{\prime}(\tau) +\int_0^{\hat{x}_1(\tau,\zeta)} \piff{e_{\tilde{x}^H,1}}{\tau}d\tilde{x} +\int_0^{\hat{x}(\tau,\zeta)} \piff{e_{\tilde{x},1}}{\tau}d\tilde{x} \nonumber\\
         &+& \int_0^{\hat{x}_2(\tau,\zeta)} \piff{e_{\tilde{x}^H,2}}{\tau}d\tilde{x}+\int_{\hat{x}(\tau,\zeta)}^{1} \piff{e_{\tilde{x},2}}{\tau}d\tilde{x} + (e_{\hat{x},1}(\tau,\zeta)-e_{\hat{x},2}(\tau,\zeta)) \piff{\hat{x}}{\tau}\nonumber\\
         &+& (e_{\hat{x}_1,1}(\tau,\zeta)-e_0(\tau))\piff{\hat{x}_1}{\tau}+(e_{\hat{x}_2,2}(\tau,\zeta)-e_0(\tau)) \piff{\hat{x}_2}{\tau} \nonumber\\
         \piff{E}{\zeta}&=& \int_0^{\hat{x}_1(\tau,\zeta)} \piff{e_{\tilde{x}^H,1}}{\zeta}d\tilde{x} +\int_0^{\hat{x}(\tau,\zeta)} \piff{e_{\tilde{x},1}}{\zeta}d\tilde{x}+\int_0^{\hat{x}_2(\tau,\zeta)} \piff{e_{\tilde{x}^H,2}}{\zeta}d\tilde{x}+\int_{\hat{x}(\tau,\zeta)}^{1} \piff{e_{\tilde{x},2}}{\zeta}d\tilde{x} \nonumber\\&+& (e_{\hat{x},1}(\tau,\zeta)-e_{\hat{x},2}(\tau,\zeta)) \piff{\hat{x}}{\zeta}
         + (e_{\hat{x}_1,1}(\tau,\zeta)-e_0(\tau))\piff{\hat{x}_1}{\zeta}+(e_{\hat{x}_2,2}(\tau,\zeta)-e_0(\tau)) \piff{\hat{x}_2}{\zeta} \nonumber
\end{eqnarray}
\end{subequations}
Using this and the first-order conditions \eqref{foc1} and \eqref{foc2} from profit maximization on the price setting stage as well as \eqref{fuc1} and \eqref{fuc2} from profit maximization on the technology level setting stage, we can rearrange \eqref{taxeq01} and \eqref{subsidyeq} to obtain
\begin{subequations}
\begin{eqnarray}\label{easytaxeq}
    &0&= (d-\tau) \piff{E}{\tau} +\frac{\hat{x}(\tau,\zeta)+\hat{x}_1(\tau,\zeta)}{\piff{\tilde{x}_1}{p_1}}\left(\piff{\hat{x}}{\tau}+\piff{\hat{x}_1}{\tau}\right)+\frac{1-\hat{x}(\tau,\zeta)+\hat{x}_2(\tau,\zeta)}{\piff{\tilde{x}_2}{p_2}}\left(\piff{\hat{x}_2}{\tau}-\piff{\hat{x}}{\tau}\right)\\
    &+& \left[\int_0^{\hat{x}(\tau,\zeta)} C_{r_1}^{I_1} (e_{\tilde{x},1},r_1,\tilde{x}) d\tilde{x} +\int_0^{\hat{x}_1(\tau,\zeta)} C_{r_1}^{I_1} (e_{
 \tilde{x}^H,1},r_1,\alpha_1 \tilde{x}) d\tilde{x} \right.\nonumber\\
 &+&\left. \frac{\hat{x}(\tau,\zeta)+\hat{x}_1(\tau,\zeta)}{1-\zeta}
 \left[\left(\frac{\piff{\tilde{x}}{p_1}}{\piff{x_1^H}{p_1}+\piff{\tilde{x}}{p_1}}\right)\left(\piff{p_2}{r_1}- C_{r_1}^{I_1}(\hat{x})\right) - \left(\frac{\piff{x_1^H}{p_1}}{\piff{x_1^H}{p_1}+\piff{\tilde{x}}{p_1}}\right) C_{r_1}^{I_1}(\alpha_1 x_1^H) \right]\right]\piff{r_1}{\tau}\nonumber\\
        &+&\left[\int_{\hat{x}(\tau,\zeta)}^1 C_{r_2}^{I_2} (e_{\tilde{x},2},r_2,1-\tilde{x}) d\tilde{x} +\int_0^{\hat{x}_2(\tau,\zeta)} C_{r_2}^{I_2} (e_{\tilde{x}^H,2},r_2,\alpha_2 \tilde{x}) d\tilde{x} \right.\nonumber\\
        &+&\left.\frac{1-\hat{x}(\tau,\zeta)+\hat{x}_2(\tau,\zeta)}{1-\zeta}\left[\left(\frac{-\piff{\tilde{x}}{p_2}}{\piff{x_2^H}{p_2}-\piff{\tilde{x}}{p_2}}\right)\left(\piff{p_1}{r_2}-C_{r_2}^{I_2}(1-\hat{x})\right) -\left(\frac{\piff{x_2^H}{p_2}}{\piff{x_2^H}{p_2}-\piff{\tilde{x}}{p_2}} \right)C_{r_2}^{I_2}(\alpha_2 x_2^H)\right]\right]\piff{r_2}{\tau}\nonumber
\end{eqnarray}
and
\begin{eqnarray}\label{easysubsidyeq}
    0&=& (d-\tau) \piff{E}{\zeta} +\frac{\hat{x}(\tau,\zeta)+\hat{x}_1(\tau,\zeta)}{\piff{\tilde{x}_1}{p_1}}\left(\piff{\hat{x}}{\zeta}+\piff{\hat{x}_1}{\zeta}\right)+\frac{1-\hat{x}(\tau,\zeta)+\hat{x}_2(\tau,\zeta)}{\piff{\tilde{x}_2}{p_2}}\left(\piff{\hat{x}_2}{\zeta}-\piff{\hat{x}}{\zeta}\right)\\
    &+& \left[\int_0^{\hat{x}(\tau,\zeta)} C_{r_1}^{I_1} (e_{\tilde{x},1},r_1,\tilde{x}) d\tilde{x} +\int_0^{\hat{x}_1(\tau,\zeta)} C_{r_1}^{I_1} (e_{
 \tilde{x}^H,1},r_1,\alpha_1 \tilde{x}) d\tilde{x} \right.\nonumber\\
 &+&\left. \frac{\hat{x}(\tau,\zeta)+\hat{x}_1(\tau,\zeta)}{1-\zeta}
 \left[\left(\frac{\piff{\tilde{x}}{p_1}}{\piff{x_1^H}{p_1}+\piff{\tilde{x}}{p_1}}\right)\left(\piff{p_2}{r_1}- C_{r_1}^{I_1}(\hat{x})\right) - \left(\frac{\piff{x_1^H}{p_1}}{\piff{x_1^H}{p_1}+\piff{\tilde{x}}{p_1}}\right) C_{r_1}^{I_1}(\alpha_1 x_1^H) \right]\right]\piff{r_1}{\zeta}\nonumber\\
        &+&\left[\int_{\hat{x}(\tau,\zeta)}^1 C_{r_2}^{I_2} (e_{\tilde{x},2},r_2,1-\tilde{x}) d\tilde{x} +\int_0^{\hat{x}_2(\tau,\zeta)} C_{r_2}^{I_2} (e_{\tilde{x}^H,2},r_2,\alpha_2 \tilde{x}) d\tilde{x} \right.\nonumber\\
        &+&\left.\frac{1-\hat{x}(\tau,\zeta)+\hat{x}_2(\tau,\zeta)}{1-\zeta}\left[\left(\frac{-\piff{\tilde{x}}{p_2}}{\piff{x_2^H}{p_2}-\piff{\tilde{x}}{p_2}}\right)\left(\piff{p_1}{r_2}-C_{r_2}^{I_2}(1-\hat{x})\right) -\left(\frac{\piff{x_2^H}{p_2}}{\piff{x_2^H}{p_2}-\piff{\tilde{x}}{p_2}} \right)C_{r_2}^{I_2}(\alpha_2 x_2^H)\right]\right]\piff{r_2}{\zeta}\nonumber
\end{eqnarray}
\end{subequations}

"Solving" this system for $\tau$ and $\zeta$ yields \eqref{hintermixsbtau} and \eqref{hintermixsbsubs}.

Finally, setting $\zeta=0$ and solving only \eqref{easytaxeq} for $\tau$,  we obtain the second-best emission tax formula \eqref{taxformulasbh} for the case, where the emission tax is the regulator's only instrument.
\end{appendix}
%\setcitestyle{authoryear,open={((},close={))}}
%\bibliographystyle{apalike}
%\bibliographystyle{acm}
%\bibliography{Literature.bib}
\end{document}
