Skip to main content
added 408 characters in body
Source Link

Jelly, 13 12 bytes

Ø.,æ*ÆḊN,ÆṭƲ

Try it online!

Takes input as [v, u] on the left, and a on the right. Outputs as [β, α]

-1 byte thanks to ovs!

Uses xnor's formula that

$$\alpha = \operatorname{tr} \left( \begin{bmatrix} 0 & 1 \\ v & u \end{bmatrix}^a \right) \\ \beta = -(-v)^a = - \det \left( \begin{bmatrix} 0 & 1 \\ v & u \end{bmatrix}^a \right)$$

Full explanation coming

How it works

Ø.,æ*ÆḊN,ÆṭƲ - Main link. Takes [v, u] on the left, a on the right
Ø.           - Yield [0, 1]
  ,          - Pair; [[0, 1], [v, u]]
   æ*        - Matrix power to a; Call this M
           Ʋ - Last 4 links as a monad f(M):
     ÆḊ      -   Determinant of M
       N     -   Negated
         Æṭ  -   Trace of M
        ,    -   Pair; [-det(M), tr(M)]

Jelly, 13 12 bytes

Ø.,æ*ÆḊN,ÆṭƲ

Try it online!

Takes input as [v, u] on the left, and a on the right. Outputs as [β, α]

-1 byte thanks to ovs!

Uses xnor's formula that

$$\alpha = \operatorname{tr} \left( \begin{bmatrix} 0 & 1 \\ v & u \end{bmatrix}^a \right) \\ \beta = -(-v)^a = - \det \left( \begin{bmatrix} 0 & 1 \\ v & u \end{bmatrix}^a \right)$$

Full explanation coming

Jelly, 13 12 bytes

Ø.,æ*ÆḊN,ÆṭƲ

Try it online!

Takes input as [v, u] on the left, and a on the right. Outputs as [β, α]

-1 byte thanks to ovs!

Uses xnor's formula that

$$\alpha = \operatorname{tr} \left( \begin{bmatrix} 0 & 1 \\ v & u \end{bmatrix}^a \right) \\ \beta = -(-v)^a = - \det \left( \begin{bmatrix} 0 & 1 \\ v & u \end{bmatrix}^a \right)$$

How it works

Ø.,æ*ÆḊN,ÆṭƲ - Main link. Takes [v, u] on the left, a on the right
Ø.           - Yield [0, 1]
  ,          - Pair; [[0, 1], [v, u]]
   æ*        - Matrix power to a; Call this M
           Ʋ - Last 4 links as a monad f(M):
     ÆḊ      -   Determinant of M
       N     -   Negated
         Æṭ  -   Trace of M
        ,    -   Pair; [-det(M), tr(M)]
added 100 characters in body
Source Link

Jelly, 1313 12 bytes

Ø.,æ*Æṭæ*ÆḊN,ḢN*NʋÆṭƲ

Try it online!Try it online!

Takes input as [v, u] on the left, and a on the right. Outputs as , β]α]

-1 byte thanks to ovs!

Uses xnor's formula that

$$\alpha = \operatorname{tr} \left( \begin{bmatrix} 0 & 1 \\ v & u \end{bmatrix}^a \right) \\ \beta = -(-v)^a$$$$\alpha = \operatorname{tr} \left( \begin{bmatrix} 0 & 1 \\ v & u \end{bmatrix}^a \right) \\ \beta = -(-v)^a = - \det \left( \begin{bmatrix} 0 & 1 \\ v & u \end{bmatrix}^a \right)$$

Full explanation coming

Jelly, 13 bytes

Ø.,æ*Æṭ,ḢN*Nʋ

Try it online!

Takes input as [v, u] on the left, and a on the right. Outputs as , β]

Uses xnor's formula that

$$\alpha = \operatorname{tr} \left( \begin{bmatrix} 0 & 1 \\ v & u \end{bmatrix}^a \right) \\ \beta = -(-v)^a$$

Full explanation coming

Jelly, 13 12 bytes

Ø.,æ*ÆḊN,ÆṭƲ

Try it online!

Takes input as [v, u] on the left, and a on the right. Outputs as , α]

-1 byte thanks to ovs!

Uses xnor's formula that

$$\alpha = \operatorname{tr} \left( \begin{bmatrix} 0 & 1 \\ v & u \end{bmatrix}^a \right) \\ \beta = -(-v)^a = - \det \left( \begin{bmatrix} 0 & 1 \\ v & u \end{bmatrix}^a \right)$$

Full explanation coming

Source Link

Jelly, 13 bytes

Ø.,æ*Æṭ,ḢN*Nʋ

Try it online!

Takes input as [v, u] on the left, and a on the right. Outputs as [α, β]

Uses xnor's formula that

$$\alpha = \operatorname{tr} \left( \begin{bmatrix} 0 & 1 \\ v & u \end{bmatrix}^a \right) \\ \beta = -(-v)^a$$

Full explanation coming