How do I perform a regression when I know there is a multiplicative relationship between the regression coefficients? Suppose I'm attempting to use linear regression but instead of
$$y_i = \beta_0 + \beta_1 x_1 + \beta_2 x_2 + \beta_3 x_3 + \beta_4 x_4 + \varepsilon_i,$$
for scientific reasons, I know that $β_2=\alpha\beta_1$ and $β_4=\alpha\beta_3$. So my formula is actually:
$$y_i = \beta_0 + \beta_1 x_1 + \alpha\beta_1 x_2 + \beta_3 x_3 + \alpha\beta_3 x_4 + \varepsilon_i$$
Note that the variable $\alpha$ is the same in both equations but unknown. How should I tackle something like this?

I am thinking of two different ways with different types of analysis.
A) you simply run the regression as if they are no relationship. In R, you can use model = lm(y ~ x1 + x2 + x3 + x4). Once you get the coefficient values from summary(model) or coef(model), you use linear equations, where:
$$
\hat{\beta_2}=\hat{\alpha}\hat{\beta_1}
$$
OR
$$
\hat{\beta_4}=\hat{\alpha}\hat{\beta_3}
$$
The only concern I have is that both values of $\hat{\alpha}$ is no similar.
B) Imposing conditions as you stated. I am not sure how to run this in R but I think Solver in Excel can help you.
My question to you: How does the coefficient has relationship with one another? I usually find the case where the "so-called" independent variables are actually not independent, meaning $x_1=f(x_2)$ and $x_3=f(x_4)$
