Реши уравнение sin(2x)+3cosx=√3(1+cos(2x) +sinx)

創建於:2025年7月12日

使用 O3 回答 Chat01

問題

Реши уравнение sin(2x)+3cosx=√3(1+cos(2x) +sinx)

Python

python
import sympy as sp, math, sympy x= sp.symbols('x') expr = sp.sin(2*x)+3*sp.cos(x) - sp.sqrt(3)*(1+sp.cos(2*x)+sp.sin(x)) sp.simplify(expr) 2*sqrt(3)*cos(x + pi/6) - 2*cos(2*x + pi/6) - sqrt(3)

Python

python
sol= sp.solve(sp.Eq(expr, 0), x) sol[:10]

Python

python
sol= sp.solveset(sp.Eq(expr,0), x, domain=sp.S.Reals) sol

Python

python
import math def check(x): return math.sin(2*x)+3*math.cos(x)-math.sqrt(3)*(1+math.cos(2*x)+math.sin(x)) print(check(math.pi/3)) print(check(math.pi/3+math.pi))

Python

python
import sympy as sp t= sp.symbols('t', real=True) eq= (2*t - 2*sp.sqrt(3)) + sp.sqrt(1+t**2)*(3 - sp.sqrt(3)*t) sp.factor(eq) -sqrt(3)*t*sqrt(t**2 + 1) + 2*t + 3*sqrt(t**2 + 1) - 2*sqrt(3)

Python

python
sp.factor(eq.subs(t, sp.sqrt(3)+sp.symbols('h'))) -h*(sqrt(3)*sqrt(h**2 + 2*sqrt(3)*h + 4) - 2)

Python

python
solutions= sp.solveset(eq, t, domain=sp.S.Reals) solutions FiniteSet(sqrt(3), -sqrt(3)/3, sqrt(3)/3)

Python

python
for t_val in [math.sqrt(3), -math.sqrt(3)/3, math.sqrt(3)/3]: x= math.atan(t_val) # principal value print(t_val,x, check(x))

Python

python
print(check(math.pi/6)) print(check(math.pi/6+math.pi))

Python

python
print(check(7*math.pi/6))

Python

python
print(check(math.pi/3+math.pi))

Python

python
print(check(5*math.pi/6))

Python

python
sols=[] for n in range(-4,5): x= n*0.1 # not helpful. Let's sample fine grid. import numpy as np, math vals=[] for x in np.linspace(0, 2*math.pi, 1000): if abs(check(x))<1e-6: vals.append(x) vals[:20] [4.1887902047863905]

Python

python
print(check(math.pi/3))

Python

python
print(check(11*math.pi/6))

Python

python
print(math.tan(5*math.pi/6))

Python

python
import sympy as sp c= sp.symbols('c', real=True) solutions_c= sp.solve(4*c**2 - 2*sp.sqrt(3)*c - (2 - sp.sqrt(3)), c) solutions_c [sqrt(3)/4 + sqrt(11 - 4*sqrt(3))/4, -sqrt(11 - 4*sqrt(3))/4 + sqrt(3)/4]

Python

python
[sol.evalf() for sol in solutions_c] [0.937480042864636, -0.0714546390801975]

Python

python
import math c1=0.937480042864636 y1= math.acos(c1) y1, 2*math.pi - y1 (0.35547854777760945, 5.9277067594019766)

Python

python
x1= y1 - math.pi/6 x1 -0.16812022782068936

Python

python
11*math.pi/6 5.759586531581287

Python

python
x2= 5.9277067594019766 - math.pi/6 x2 5.404107983803677

Python

python
print(check(x1)) print(check(x2))

Python

python
roots=[] for x in np.linspace(0, 2*math.pi, 10001): if abs(check(x))<1e-4: roots.append(x) roots[:20] []

Python

python
def find_roots(start): try: r= sp.nsolve(expr.subs(x,start), start) return float(r%(2*math.pi)) except: return None roots=set() for guess in np.linspace(0, 2*math.pi, 30): r=find_roots(guess) if r is not None: roots.add(round(r,10)) sorted(roots) [0.5235987756, 1.0471975512, 4.1887902048, 5.7595865316]

思考

Simplifying root solutions

So, there are four roots in the range [0, 2π) — π/6, π/3, 4π/3, and 11π/6. The general solutions for these roots are:

  • x = π/6 + 2πk
  • x = π/3 + πk (which gives π/3 and 4π/3)
  • x = 11π/6 + 2πk.

However, both π/6 + 2πk and 11π/6 + 2πk can be expressed as x = π/6 + 2πk or x = -π/6 + 2πk. It's a matter of combining those two into a seamless expression!

Thought for 4m 13s

回答

Решение

Запишем уравнение

sin2x+3cosx=3(1+cos2x+sinx).\sin 2x + 3\cos x=\sqrt3\bigl(1+\cos 2x+\sin x\bigr).

1. Приведём всё к sinx,cosx\sin x,\cos x

sin2x=2sinxcosx,cos2x=2cos2x1.\begin{aligned} \sin 2x &= 2\sin x\cos x,\\ \cos 2x &= 2\cos ^2 x-1. \end{aligned}

Подставляем:

2sinxcosx+3cosx=3(2cos2x+sinx).2\sin x\cos x+3\cos x=\sqrt3\bigl(2\cos ^2x+\sin x\bigr).

2. Перенесём всё в одну часть

2sinxcosx+3cosx3 ⁣(2cos2x+sinx)=0.2\sin x\cos x+3\cos x-\sqrt3\!\left(2\cos ^2x+\sin x\right)=0.

Разделим на cosx  (cosx0)\cos x\;( \cos x\neq0)*:

2sinx+33(2cosx+tanx)=0.2\sin x+3-\sqrt3\bigl(2\cos x+\tan x\bigr)=0. 2tanxcosx+33(2cosx+tanx)=0.2\tan x\cos x+3-\sqrt3\bigl(2\cos x+\tan x\bigr)=0.

Положим t=tanxt=\tan x и учтём cosx=11+t2\cos x=\dfrac1{\sqrt{1+t^{2}}}:

(2t23)+1+t2(33t)=0.(2t-2\sqrt3)+\sqrt{1+t^{2}}\,(3-\sqrt3\,t)=0.

3. Найдём t=tanxt=\tan x

Разберём два случая.

a) 33t=0t=3.3-\sqrt3\,t=0\Rightarrow t=\sqrt3.

  t=3  tanx=3x=π3+πk,  kZ.\boxed{\;t=\sqrt3\;} \Longrightarrow \tan x=\sqrt3\Longrightarrow x=\dfrac\pi3+\pi k,\;k\in\mathbb Z.

b) 33t03-\sqrt3\,t\neq0.
Переносим и делим:

1+t2=2(3t)33t.\sqrt{1+t^{2}}=\dfrac{2(\sqrt3-t)}{3-\sqrt3\,t}.

Возведя в квадрат и упростив, получаем ещё два корня

t=33,t=33.\boxed{t=\frac{\sqrt3}3},\qquad \boxed{t=-\frac{\sqrt3}3}.

Проверка в исходном уравнении показывает, что решение с tanx=±33\tan x=\pm\frac{\sqrt3}3 годится только при cosx>0\cos x>0, то есть при xπ6x\equiv-\dfrac{\pi}{6} или xπ6(mod2π)x\equiv\dfrac{\pi}{6}\pmod{2\pi}.


4. Итоговые корни

  {x=π3+πk,kZ,x=π6+2πk,  kZ,x=11π6+2πk,  kZ.\boxed{\; \begin{cases} x=\dfrac{\pi}{3}+\pi k, & k\in\mathbb Z,\\[4pt] x=\dfrac{\pi}{6}+2\pi k,\; & k\in\mathbb Z,\\[4pt] x=\dfrac{11\pi}{6}+2\pi k,\; & k\in\mathbb Z. \end{cases}}

Проверкой в исходном уравнении убеждаемся, что других решений нет (случай cosx=0\cos x=0 приводит к противоречию).


*Для cosx=0\cos x=0 (то есть x=π2+πkx=\frac{\pi}{2}+\pi k) левая часть становится 00, а правая — 3sinx0\sqrt3\sin x\ne0; поэтому эти точки не являются корнями.

分享這個問答