Use Euler's method with step size 0.5 to compute the approximate y-values y1, y2, y3 and y4 of the solution of the initial-value problem y' = y − 3x, y(4) = 0.

the function g(x)=x^2+5x, x>=p is one to one. find the least value of p, the range of g, sketch the graph of this function.

g(x) = (x + 5/2)^2 - 25/4

p = -25/4

there are Euler's method calculators online.

i had figured it out before actually, and had posted saying that, so not sure why my comment about figuring it out isn't there.

To use Euler's method with a step size of 0.5, we start by representing the equation as a difference equation:

y[n+1] = y[n] + h * f(x[n], y[n])

Where:
- y[n+1] is the value of y at the next step.
- y[n] is the value of y at the current step.
- h is the step size, which is 0.5 in this case.
- f(x[n], y[n]) is the derivative of y with respect to x, which is y - 3x in this problem.
- x[n] represents the current value of x.

Let's perform the calculations step by step:

Step 1:
We start with the initial condition y(4) = 0. Since the step size is 0.5, we need to find the value of y at x = 4.5:

x[0] = 4
y[0] = 0

f(x[0], y[0]) = y[0] - 3 * x[0] = 0 - 3 * 4 = -12

y[1] = y[0] + h * f(x[0], y[0])
= 0 + 0.5 * (-12)
= -6

Step 2:
Using the calculated value of y[1] as the initial condition, we repeat the process to find y at x = 5:

x[1] = 4.5
y[1] = -6

f(x[1], y[1]) = y[1] - 3 * x[1] = -6 - 3 * 4.5 = -19.5

y[2] = y[1] + h * f(x[1], y[1])
= -6 + 0.5 * (-19.5)
= -15.75

Step 3:
Using the calculated value of y[2] as the initial condition, we repeat the process to find y at x = 5.5:

x[2] = 5
y[2] = -15.75

f(x[2], y[2]) = y[2] - 3 * x[2] = -15.75 - 3 * 5 = -30.75

y[3] = y[2] + h * f(x[2], y[2])
= -15.75 + 0.5 * (-30.75)
= -31.125

Step 4:
Finally, using the calculated value of y[3] as the initial condition, we find y at x = 6:

x[3] = 5.5
y[3] = -31.125

f(x[3], y[3]) = y[3] - 3 * x[3] = -31.125 - 3 * 5.5 = -47.625

y[4] = y[3] + h * f(x[3], y[3])
= -31.125 + 0.5 * (-47.625)
= -55.4375

So, the approximate y-values y1, y2, y3, and y4 of the solution of the initial-value problem y' = y - 3x, y(4) = 0 using Euler's method with step size 0.5 are:
y1 = -6
y2 = -15.75
y3 = -31.125
y4 = -55.4375