1 Introduction
One of the most famous identities of Jacobi states that

One can view (1.1) as a solution to

where
$A,B$
and C are theta series of weight one. This identity is instrumental in the parametrisation of Gauss’ arithmetic–geometric mean by modular forms [Reference Borwein and Borwein2, Reference Solé and Loyer8].
In [Reference Chan, Chua and Solé5], Chan et al., motivated by the study of codes and lattices, found that, for any positive integer d,

Identity (1.3) provides an infinite number of solutions in theta functions of weight one to (1.2). For more information on this generalised Jacobi identity, see [Reference Chan, Chua and Solé6, Reference Chua and Solé7].
Recently, while studying theta series associated with binary quadratic forms of discriminant
$-15$
, we discovered the identity

We establish the following analogue of (1.3) for which (1.4) is a special case.
Theorem 1.1. Let d be any positive integer and let
$1\leq b\leq d-1$
. Then

When
$d=2$
and
$b=1$
, we recover (1.4) from (1.5). The proof of (1.5) is given in Section 2.
Our discovery of (1.5) provides a motivation for deriving the following two-variable version of (1.3): that is,

Observe that, when
$b=1$
, (1.6) implies (1.3). We give a proof of (1.6) in Section 3.
2 Proof of (1.5)
The Jacobi one-variable theta functions are defined by

and

We first express the theta functions in (1.5) in terms of
$\vartheta _j(q), j=2,3,4$
.
Lemma 2.1. For
$|q|<1$
,


and

Proof. We observe that

Next, since

we find that

Therefore,

which completes the proof of (2.1). The proof of (2.2) is similar to the proof of (2.1).
To prove (2.3), we need the identity

Identity (2.4) is true because

From (2.4), we deduce that, for any integer
$\ell $
,

A consequence of (2.5) is that

We are now ready to prove (2.3). Write

Let
$k=m-n.$
Then

which is (2.3). The last equality follows by writing

where we have used (2.6) in the first equality.
Using (2.1) and (2.2), we deduce that

Next, it is known from Jacobi’s triple product identity that

and

Therefore,

Replacing
$q^2$
by q and using (2.3), we deduce that

and the proof of (1.5) is complete.
It is possible to derive (2.7) without using Jacobi’s triple product identity. For more details, see [Reference Chan4, page 58].
When
$d=1$
and
$b=0$
, (1.5) becomes

which reduces to

By (2.7), we arrive at (1.1). Next, (2.8) can then be written as

Identity (2.9) appeared in [Reference Berndt, Chan and Liaw1, page 140] and the functions

play important roles in Ramanujan’s theory of elliptic functions to the quartic base (see [Reference Borwein and Borwein3, Theorem 2.6(b)] and [Reference Berndt, Chan and Liaw1, (1.10) and (1.11)]).
3 Proof of (1.6)
The proof of (1.6) is similar to the proof of (1.3). First, we need a lemma.
Lemma 3.1. Let
$0< b<4d$
. Then


and

Proof. The proof of (3.1) follows by writing
$A_{b,d}$
as

Splitting the sum into two sums with one summing over even integers
$n=2\ell $
and the other summing over odd integers
$n=2\ell +1$
, we find that

and this completes the proof of (3.1). Next, write
$B_{b,d}$
as

Splitting the sum into two sums with one summing over even integers
$n=2\ell $
and the other summing over odd integers
$n=2\ell +1$
and using (2.5), we find that

and (3.2) follows. Finally, to prove (3.3), write

Splitting the sum into two sums with one summing over even integers
$n=2\ell $
and the other summing over odd integers
$n=2\ell +1$
, we deduce that

and the proof of (3.3) is complete.
To complete the proof of (1.6), we note that

and

But it is immediate that

and

Therefore,

where the last equality follows from [Reference Borwein and Borwein2, page 34]. Therefore,

and the proof of (1.6) is complete.
4 Concluding remarks
We have found infinitely many solutions to
$X^2+Y^2=Z^2$
, where
$X,Y$
and Z are theta series of weight one. The Borweins’ identity states that

where
$\omega =e^{2\pi i/3}.$
This is the only example of a solution to
$X^3+Y^3=Z^3$
with X, Y and Z being theta series of weight one. Are there infinitely many solutions to
$X^3+Y^3=Z^3$
, where
$X,Y$
and Z are theta series of weight one, apart from (4.1)? This appears to be an interesting question.