Skip to content

Instantly share code, notes, and snippets.

@Lulzx
Created February 2, 2019 15:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Lulzx/6c2542eb8f83cf28014786fd5784531d to your computer and use it in GitHub Desktop.
Save Lulzx/6c2542eb8f83cf28014786fd5784531d to your computer and use it in GitHub Desktop.
solution for a math problem

Solve ( d^2 y(x))/( dx^2) + y(x) = 0:

Assume a solution will be proportional to e^(λ x) for some constant λ. Substitute y(x) = e^(λ x) into the differential equation: ( d^2 )/( dx^2)(e^(λ x)) + e^(λ x) = 0

Substitute ( d^2 )/( dx^2)(e^(λ x)) = λ^2 e^(λ x): λ^2 e^(λ x) + e^(λ x) = 0

Factor out e^(λ x): (λ^2 + 1) e^(λ x) = 0

Since e^(λ x) !=0 for any finite λ, the zeros must come from the polynomial: λ^2 + 1 = 0

Solve for λ: λ = i or λ = -i INTERMEDIATE STEPS: Solve for λ: λ^2 + 1 = 0 Hint: | Isolate terms with λ to the left hand side. Subtract 1 from both sides: λ^2 = -1 Hint: | Eliminate the exponent on the left hand side. Take the square root of both sides: Answer: | | λ = i or λ = -i |

The roots λ = ± i give y_1(x) = c_1 e^(i x), y_2(x) = c_2 e^(-i x) as solutions, where c_1 and c_2 are arbitrary constants. The general solution is the sum of the above solutions: y(x) = y_1(x) + y_2(x) = c_1 e^(i x) + c_2 e^(-i x)

Apply Euler's identity e^(α + i β) = e^α cos(β) + i e^α sin(β): y(x) = c_1 (cos(x) + i sin(x)) + c_2 (cos(x) - i sin(x))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment