Poj--1045
来源:互联网 发布:淘宝复制链接在哪打开 编辑:程序博客网 时间:2024/06/13 06:40
题意:给出公式V2=iR,V2=Vr * cos(wt + q), V1=Vs * cos(wt), i = C * d(v1 - v2)/dt; d是求导数的意思。已知Vs,R,C,w,求Vr。
分析:利用V2分别等于两个式子,将i,V2和V1带入,可得方程:R*C*d(Vs * cos(wt) - Vr * cos(wt + q))/dt = Vr * cos(wt + q)
根据求导公式:d(cos(x))/dx = -sinx可将原方程化为:R*C*w*(Vr*sin(wt + q) - Vs*sin(wt)) = Vr * cos(wt + q)
在这里三角函数的参数有两个:wt+q和wt,我们分别令他们为0,方程分别可变为:R*C *w*Vs*sin(q) = Vr; R*C * w*sin(q) = cos(q)
由2式得:cot(q) = R * C * w。
由公式:sin^2(a) = 1/(cot ^2(a) + 1)
可得:sin(q)=sqrt(1/(cot^2(q) + 1))
即:sin(q) =sqrt(1/(R^2*C^2*w^2 + 1))
代入1式可得:Vr = R * C * w * Vs * sqrt(1/(R^2*C^2*w^2 + 1))
#include<cstdio>#include<cmath>#include<ctime>#include<queue>#include<stack>#include<cstring>#include<cstdlib>#include<iostream>#include<algorithm>using namespace std;#define max(a,b) a>b?a:b#define min(a,b) a>b?b:a#define mem(a,b) memset(a,b,sizeof(a))int dir[4][2]= {{0,1},{0,-1},{1,0},{-1,0}};int n;double vs, r, c, w;int main(){ scanf("%lf%lf%lf%d", &vs, &r, &c, &n); while (n--) { scanf("%lf", &w); printf("%.3f\n", r * c * w * vs * sqrt(1/(r*r*c*c*w*w + 1))); } return 0;}
0 0
- POJ-1045
- POJ 1045
- POJ 1045
- POJ 1045
- Poj--1045
- POJ 1045
- POJ 1045 Bode Plot
- Poj 1045 Bode Plot
- poj 1045 Bode Plot
- poj 1045,1047
- POJ 1045 解题报告
- POJ 1045:Bode Plot
- POJ 1045 Bode Plot
- POJ
- poj
- POJ
- POJ
- poj
- dedecms后台登录提示Call to undefined function getcururl()解决办法
- Log使用
- 第14&15题 Remove Duplicates from Sorted Array I&II
- nginx内置预定义变量
- Jetty 的工作原理以及与 Tomcat 的比较
- Poj--1045
- Climbing Stairs
- Dede自动采集伪原创发布更新一体化插件
- keil(MDK)中出现error: #513: a value of type "int" cannot be assigned to an entity of type "char *",即函数返
- 求数组的最大子数组和最大子数组的和
- WinForm 应用程序的打包和部署_简单版(图文)
- Python向PHP发起GET与POST请求
- C语言的数组名和对数组名取地址
- 计算几何