Adding two symbolic equations

102 Views Asked by At

I have two equations in Matlab, say

x^2+2*y=3,   
y^4=5*x+1  

Here x,y are symbolic variables. What is the best way to add up these two equations, not manually of course ( if the LHS and RHS gets added up separately and stays in the same form, the better).

1

There are 1 best solutions below

0
Hazem On
syms x y
a1=x^2+2*y-3
a2=y^4-5*x-1
a=a1+a2

The result,

ans = x^2 - 5*x + y^4 + 2*y - 4