# Thread: Define g if equation resulting from g(x)+g'(x) is known

1. ## Define g if equation resulting from g(x)+g'(x) is known

Hello,

I have trouble understanding how to go about solving the function g. All that is known is that

1) the function g is a square function

2) $\displaystyle g(x)+g'(x)=3x^2+4x+2$

2. What do you mean by "square function"? My first thought was a "square wave" (beloved of electrical engineers) but I suspect you mean just a "quadratic function. Okay, the most general quadratic function would be $\displaystyle g(x)= ax^2+ bx+ c$ for numbers a, b, and c. Then $\displaystyle g'(x)= 2ax+ b$ and the equation you have becomes $\displaystyle ax^2+ bx+ c+ 2ax+ b= 3x^2+ 4x+ 2$. Combine "like powers" on the left, set the corresponding coefficients equal and solve for a, b, and c.

3. Yes I meant a quadratic function!

I don't follow when you write Combine "like powers" on the left...

I get how $\displaystyle a=3$, since there is only one coefficient of $\displaystyle x^2$.

4. Originally Posted by Bato91
Hello,

I have trouble understanding how to go about solving the function g. All that is known is that

1) the function g is a square function

2) $\displaystyle g(x)+g'(x)=3x^2+4x+2$

Substitute $\displaystyle g(x) = ax^2 + bx + c$ into the left hand side and then equate the coefficients of x on each side:

Coeff of x^2: a = 3

Coeff of x: b + 2a = 4

Coeff of x^0 (constant term): ..... = 2.

Solve these three equations for a, b and c.

5. Pratically we have a classical first order linear DE...

$\displaystyle g^{'} (x) = -g(x) + 3 x^{2} +4x +2$ (1)

... of which we are searching a solution in some sense 'quadratic'. If we proceed in 'standard fashion' we find that...

$\displaystyle g(x)= c\cdot e^{-x} + 3 x^{2} -2 x + 4$ (2)

... where c is an arbitrary constant. Now may be that for 'quadratic' we intend that it must be $\displaystyle c=0$... or may be some else ...

Merry Christmas from Italy

$\displaystyle \chi$ $\displaystyle \sigma$

6. I started to do it that way, then saw the "square function". Which means there is no exponential contribution and I thought the full method was "overkill".

Originally Posted by chisigma
Pratically we have a classical first order linear DE...

$\displaystyle g^{'} (x) = -g(x) + 3 x^{2} +4x +2$ (1)

... of which we are searching a solution in some sense 'quadratic'. If we proceed in 'standard fashion' we find that...

$\displaystyle g(x)= c\cdot e^{-x} + 3 x^{2} -2 x + 4$ (2)

... where c is an arbitrary constant. Now may be that for 'quadratic' we intend that it must be $\displaystyle c=0$... or may be some else ...

Merry Christmas from Italy

$\displaystyle \chi$ $\displaystyle \sigma$