Schaum's Outline of Mathematica by Eugene Don

Schaum's Outline of Mathematica by Eugene Don

Author:Eugene Don
Language: eng
Format: epub, pdf
Publisher: McGraw-Hill Education
Published: 2019-03-12T16:00:00+00:00


SOLVED PROBLEMS

6.12 Solve the equation 5 cos x = 4 − x3. Make sure you find all solutions.

SOLUTION

Since 5 cos x = 4 − x3 if and only if 5 cos x − 4 + x3 = 0, we introduce the function f(x) = 5 cos x − 4 + x3 and look for x-intercepts. (Although we could look for the intersection of two curves, it is easier to approximate where points intercept an axis.)

f[x_] = 5 Cos [x] – 4 + x3;

Plot[f[x], {x, –1, 2}]

It appears that there are three solutions, near –0.5, 0.8, and 1.6.

FindRoot[f[x], {x, –0.5}]

{x → –0.576574}

FindRoot[f[x], {x, 0.8}]

{x → 0.797323}

FindRoot[f[x], {x, 1.6}]

{x → 1.61805}

6.13 Find a solution of the equation sin x = 2. (This problem may be omitted by those unfamiliar with functions of a complex variable.)

SOLUTION

Since –1 ≤ sin x ≤ 1 for all real x, this problem has no real solutions. We can force FindRoot to search for a complex solution by using a complex initial guess.

FindRoot[Sin[x] == 2,{x, I}]

{x → 1.5708 + 1.31696 }

6.14 Find a 20 significant digit approximation to the equation x + | sin (x - 1) | = 5.

SOLUTION

First we plot the function f(x) = x + | sin (x – 1) | – 5.

f[x_] = x + Abs[Sin[x – 1]] – 5;

Plot[f[x], {x, –10, 10}]



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.