syseq

This tag is used to solve systems of equations with 2 or 3 variables. All the coefficients must be provided, even if it is 0, in standard form. Run [p]syseq to see formatting!

Sharedunrated

Content

65 lines
{if(=={args(1)}):Solve systems of equations with 2 or 3 variables using this command!

Follow the command with either 6 or 12 numbers separated by a space depending on how many variables you want to solve respectively.

**Command usage**```css
[p]syseq [6 or 12 numbers]
```**Example**```css
[p]syseq 50 32 67 89 90 53
[p]syseq 50 32 67 89 90 53 33 58 47 12 14 26
```
2 variables: `ax + by = c`, `dx + ey = f`
3 variables: `ax + by + cz = d`, `ex + fy + gz = h`, `ix + jy + kz = l`}

{and(!={args(1)}|=={list(5):{join(~):{args}}}):Please input exactly 6 or 12 numbers!}
{and(=={list(11):{join(~):{args}}}|!={list(6):{join(~):{args}}}):Please input exactly 6 or 12 numbers!}
{if(!={list(12):{join(~):{args}}}):Please input exactly 6 or 12 numbers!}
{and({in({m:sgn({join(1):{args}})}):-1 0 1}!=true|!={args(1)}):All of the inputs must be numbers!}

{and(=={list(6):{join(~):{args}}}|{in({m:sgn({join(1):{args}})}):-1 0 1}==true|!={list(5):{join(~):{args}}}):

{=(a1):{args(1)}} {=(b1):{args(2)}} {=(co1):{args(3)}}
{=(c1):{args(4)}} {=(d1):{args(5)}} {=(co2):{args(6)}}

{=(disc):{+:({a1}*{d1})-({b1}*{c1})}}

{if(0.0!={disc}):
{=(d2):{+:{d1}/{disc}}} {=(b2):{+:(-1*{b1})/{disc}}}
{=(c2):{+:(-1*{c1})/{disc}}} {=(a2):{+:{a1}/{disc}}}

{=(x1):{+:({d2}*{co1})+({b2}*{co2})}}
{=(y1):{+:({c2}*{co1})+({a2}*{co2})}}

{=(x2):{+:round({x1}*1000)/1000}}
{=(y2):{+:round({y1}*1000)/1000}}

x={x2}, y={y2}
|This system of equations cannot be solved via matrices. Sorry for the inconvenience!}}

{and(=={list(12):{join(~):{args}}}|{in({m:sgn({join(1):{args}})}):-1 0 1}==true|!={list(11):{join(~):{args}}}):

{=(a1):{args(1)}} {=(b1):{args(2)}} {=(c1):{args(3)}} {=(co1):{args(4)}} 
{=(d1):{args(5)}} {=(e1):{args(6)}} {=(f1):{args(7)}} {=(co2):{args(8)}} 
{=(g1):{args(9)}} {=(h1):{args(10)}} {=(i1):{args(11)}} {=(co3):{args(12)}}

{=(a2):{+:({e1}*{i1})-({f1}*{h1})}} {=(d2):{+:-1*(({b1}*{i1})-({c1}*{h1}))}} {=(g2):{+:({b1}*{f1})-({c1}*{e1})}} 
{=(b2):{+:-1*(({d1}*{i1})-({f1}*{g1}))}} {=(e2):{+:({a1}*{i1})-({c1}*{g1})}} {=(h2):{+:-1*(({a1}*{f1})-({c1}*{d1}))}}
{=(c2):{+:({d1}*{h1})-({e1}*{g1})}} {=(f2):{+:-1*(({a1}*{h1})-({b1}*{g1}))}} {=(i2):{+:({a1}*{e1})-({b1}*{d1})}}

{=(disc):{+:({a1}*{a2})+({b1}*{b2})+({c1}*{c2})}}

{if(0.0!={disc}):
{=(a3):{+:{a2}/{disc}}} {=(d3):{+:{d2}/{disc}}} {=(g3):{+:{g2}/{disc}}}
{=(b3):{+:{b2}/{disc}}} {=(e3):{+:{e2}/{disc}}} {=(h3):{+:{h2}/{disc}}}
{=(c3):{+:{c2}/{disc}}} {=(f3):{+:{f2}/{disc}}} {=(i3):{+:{i2}/{disc}}}

{=(x1):{+:({a3}*{co1})+({d3}*{co2})+({g3}*{co3})}}
{=(y1):{+:({b3}*{co1})+({e3}*{co2})+({h3}*{co3})}}
{=(z1):{+:({c3}*{co1})+({f3}*{co2})+({i3}*{co3})}}

{=(x2):{+:round({x1}*1000)/1000}}
{=(y2):{+:round({y1}*1000)/1000}}
{=(z2):{+:round({z1}*1000)/1000}}

x={x2}, y={y2}, z={z2} 
|This system of equations cannot be solved via matrices. Sorry for the inconvenience!}}
Raw JSON
{
  "id": 545866,
  "created_at": "2021-01-20T02:41:35.000Z",
  "tag_name": "syseq",
  "nsfw": false,
  "owner_id": "623299563150639126",
  "uses": 48,
  "description": "This tag is used to solve systems of equations with 2 or 3 variables. All the coefficients must be provided, even if it is 0, in standard form. Run [p]syseq to see formatting!",
  "restricted": false,
  "shared": true,
  "deleted": false,
  "safe": "unrated",
  "hidden": false,
  "guild_id": "801148497465573407",
  "sharer": "623299563150639126",
  "content": "{if(=={args(1)}):Solve systems of equations with 2 or 3 variables using this command!\n\nFollow the command with either 6 or 12 numbers separated by a space depending on how many variables you want to solve respectively.\n\n**Command usage**```css\n[p]syseq [6 or 12 numbers]\n```**Example**```css\n[p]syseq 50 32 67 89 90 53\n[p]syseq 50 32 67 89 90 53 33 58 47 12 14 26\n```\n2 variables: `ax + by = c`, `dx + ey = f`\n3 variables: `ax + by + cz = d`, `ex + fy + gz = h`, `ix + jy + kz = l`}\n\n{and(!={args(1)}|=={list(5):{join(~):{args}}}):Please input exactly 6 or 12 numbers!}\n{and(=={list(11):{join(~):{args}}}|!={list(6):{join(~):{args}}}):Please input exactly 6 or 12 numbers!}\n{if(!={list(12):{join(~):{args}}}):Please input exactly 6 or 12 numbers!}\n{and({in({m:sgn({join(1):{args}})}):-1 0 1}!=true|!={args(1)}):All of the inputs must be numbers!}\n\n{and(=={list(6):{join(~):{args}}}|{in({m:sgn({join(1):{args}})}):-1 0 1}==true|!={list(5):{join(~):{args}}}):\n\n{=(a1):{args(1)}} {=(b1):{args(2)}} {=(co1):{args(3)}}\n{=(c1):{args(4)}} {=(d1):{args(5)}} {=(co2):{args(6)}}\n\n{=(disc):{+:({a1}*{d1})-({b1}*{c1})}}\n\n{if(0.0!={disc}):\n{=(d2):{+:{d1}/{disc}}} {=(b2):{+:(-1*{b1})/{disc}}}\n{=(c2):{+:(-1*{c1})/{disc}}} {=(a2):{+:{a1}/{disc}}}\n\n{=(x1):{+:({d2}*{co1})+({b2}*{co2})}}\n{=(y1):{+:({c2}*{co1})+({a2}*{co2})}}\n\n{=(x2):{+:round({x1}*1000)/1000}}\n{=(y2):{+:round({y1}*1000)/1000}}\n\nx={x2}, y={y2}\n|This system of equations cannot be solved via matrices. Sorry for the inconvenience!}}\n\n{and(=={list(12):{join(~):{args}}}|{in({m:sgn({join(1):{args}})}):-1 0 1}==true|!={list(11):{join(~):{args}}}):\n\n{=(a1):{args(1)}} {=(b1):{args(2)}} {=(c1):{args(3)}} {=(co1):{args(4)}} \n{=(d1):{args(5)}} {=(e1):{args(6)}} {=(f1):{args(7)}} {=(co2):{args(8)}} \n{=(g1):{args(9)}} {=(h1):{args(10)}} {=(i1):{args(11)}} {=(co3):{args(12)}}\n\n{=(a2):{+:({e1}*{i1})-({f1}*{h1})}} {=(d2):{+:-1*(({b1}*{i1})-({c1}*{h1}))}} {=(g2):{+:({b1}*{f1})-({c1}*{e1})}} \n{=(b2):{+:-1*(({d1}*{i1})-({f1}*{g1}))}} {=(e2):{+:({a1}*{i1})-({c1}*{g1})}} {=(h2):{+:-1*(({a1}*{f1})-({c1}*{d1}))}}\n{=(c2):{+:({d1}*{h1})-({e1}*{g1})}} {=(f2):{+:-1*(({a1}*{h1})-({b1}*{g1}))}} {=(i2):{+:({a1}*{e1})-({b1}*{d1})}}\n\n{=(disc):{+:({a1}*{a2})+({b1}*{b2})+({c1}*{c2})}}\n\n{if(0.0!={disc}):\n{=(a3):{+:{a2}/{disc}}} {=(d3):{+:{d2}/{disc}}} {=(g3):{+:{g2}/{disc}}}\n{=(b3):{+:{b2}/{disc}}} {=(e3):{+:{e2}/{disc}}} {=(h3):{+:{h2}/{disc}}}\n{=(c3):{+:{c2}/{disc}}} {=(f3):{+:{f2}/{disc}}} {=(i3):{+:{i2}/{disc}}}\n\n{=(x1):{+:({a3}*{co1})+({d3}*{co2})+({g3}*{co3})}}\n{=(y1):{+:({b3}*{co1})+({e3}*{co2})+({h3}*{co3})}}\n{=(z1):{+:({c3}*{co1})+({f3}*{co2})+({i3}*{co3})}}\n\n{=(x2):{+:round({x1}*1000)/1000}}\n{=(y2):{+:round({y1}*1000)/1000}}\n{=(z2):{+:round({z1}*1000)/1000}}\n\nx={x2}, y={y2}, z={z2} \n|This system of equations cannot be solved via matrices. Sorry for the inconvenience!}}",
  "embed": "{}",
  "last_fetched": "2026-10-20T23:51:38.328Z"
}