How can I solve this system of equation? 1.9. The program should take three numbers: a; b; c and find the roots of the quadratic equation in the form: ax^2+bx+c=0.

Layton Park

Layton Park

Answered question

2022-11-05

How can I solve this system of equation?
1.9. The program should take three numbers: a; b; c and find the roots of the quadratic equation in the form:
a x 2 + b x + c = 0
If the value of the determinant of the quadratic equation is negative (i.e. < 0), the program should write an appropriate message.
1.10. Modify the 1.9 so that the parameters A and a are functions of the parameter ϕ, e.g.
A ( ϕ = A ( 1.0 + 0.25 sin ( ϕ ) )
a ( ϕ ) = a ( 1.0 + 0.5 | sin ( ϕ ) | )
In the program, declare functions for the above equations and save the results in an array.
I have solved the 1.9 as that was easy. But I am stuck with the following:
(1) f ( x ) = f ( 1 + 0.25 sin ( x ) )
(2) g ( x ) = g ( 1 + 0.5 | sin ( x ) | )
My attempt:
Given,
f ( x ) = f ( 1 + 0.25 sin ( x ) )
Now,
f ( 1 + 0.25 sin ( x ) ) = a 16 sin 2 x + ( a 2 + b 4 ) sin x + ( a + b + c )
Let, sin x = y
So, the above equation becomes: y = ( 2 a + b ) ± b 2 4 a c 2 a
Hence,
sin x = ( 2 a + b ) ± b 2 4 a c 2 a x = sin 1 ( ( 2 a + b ) ± b 2 4 a c 2 a )
Are this procedure and solution correct?

Answer & Explanation

hamputlnf

hamputlnf

Beginner2022-11-06Added 12 answers

Step 1
I think that Problem 1.10 is almost as simple as Problem 1.9. The only difference is that the parameters a and b or c (there is no parameter A in Problem 1.9, so this should be a misprint) instead of constant values are functions of the parameter φ declared in the program (so a program solving Problem 1.10 can be a small modification of the program solving Problem 1.9). A solver has the freedom to choose the functions.
Step 2
The equality A ( ϕ ) = A ( 1.0 + 0.25 sin ( ϕ ) ) is not an equation to solve, it is an example of a function of a parameter φ. A bit confusing here is that A from the left-hand side is a name of a function and the left-hand side equals to value of A of the argument φ, whereas A from the right side is a constant and the right-hand side is a product of this A by 1.0 + 0.25 sin ( ϕ ). Similarly for the other equality.

Do you have a similar question?

Recalculate according to your conditions!

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?