How I can give condition & plot the solution of this differential equation. . . . . . . Please Guide

3 ビュー (過去 30 日間)
DEEPAK KARARWAL
DEEPAK KARARWAL 2022 年 7 月 19 日
回答済み: MOSLI KARIM 2023 年 2 月 16 日
This is the equation for which
boundery condition are
theta(z=0)=0 degree
theta(z=h)=90 degree
where h=6
z=0:h
how to give condition here
e=8.85*10^-12
dele=11
E=1
k11=9
k33=9
k22=11
syms theta(z) z dtheta
dtheta=diff(theta,z)
d2theta=diff(theta,z,2)
eqn=d2theta+((k33-k11)*cos(theta)*sin(theta))*(dtheta)^2*(1/(k11*(cos(theta))^2+k22*(sin(theta))^2))+e*dele*E^2*cos(theta)*sin(theta)*(1/(k11*(cos(theta))^2+k22*(sin(theta))^2))
cond(theta(0)==0, theta(pi/2)==0)
thetaSol = dsolve(eqn,cond)
thetaSol = unique(simplify(thetaSol))
fplot(thetaSol)
  7 件のコメント
Sam Chak
Sam Chak 2022 年 7 月 22 日
What is the value of epsilnot? @DEEPAK KARARWAL
DEEPAK KARARWAL
DEEPAK KARARWAL 2022 年 7 月 22 日
value of epsilnot=8.85*10^-12

サインインしてコメントする。

回答 (3 件)

Torsten
Torsten 2022 年 7 月 22 日
編集済み: Torsten 2022 年 7 月 22 日
dsolve doesn't succeed. Thus use a numerical solver (bvp4c) to solve your equation.
syms A theta(z)
dtheta=diff(theta,z)
dtheta(z) = 
d2theta=diff(theta,z,2)
d2theta(z) = 
eqn = d2theta + A/2*sin(2*theta)==0;
cond = [theta(0)==0, theta(6)==pi/2];
thetaSol = dsolve(eqn,cond)
Warning: Unable to find symbolic solution.
thetaSol = [ empty sym ]
  7 件のコメント
DEEPAK KARARWAL
DEEPAK KARARWAL 2022 年 7 月 28 日
yes sir, but what I want, is to give such a boundery condition at theta(z)=(__) such that I will get varying angle from 0 to 90 degree as we increase the value of E, where E is electric field and contained in the expression of A.
Torsten
Torsten 2022 年 7 月 28 日
Not clear what you mean.
The boundary value for theta at z = 6 can be set by writing it in the variable "bv" of my code above. Experiment with it.

サインインしてコメントする。


Sam Chak
Sam Chak 2022 年 7 月 22 日
Giiven the parameters, it seems that if you select initial values and , the boundary values are satisfied.
epsilnot = 8.85*10^-12;
dele = 11;
E = 1;
k11 = 9;
k33 = 9;
k22 = 11;
A = sqrt(dele*epsilnot*E^2/k11);
f = @(t, x) [x(2); ...
- (A/2)*sin(2*x(1))];
tspan = [0 6];
initc = [0 pi/12]; % initial condition
[t, x] = ode45(f, tspan, initc);
plot(t, x(:,1), 'linewidth', 1.5), grid on, xlabel('t'), ylabel('\theta')
x(end,1) % π/2 at θ(6)
ans = 1.5708
  1 件のコメント
DEEPAK KARARWAL
DEEPAK KARARWAL 2022 年 7 月 22 日
Thanks you sir , I will analyze it and than report you again, Thank you

サインインしてコメントする。


MOSLI KARIM
MOSLI KARIM 2023 年 2 月 16 日
%%
function answer
clc
clear all
close all
global A
epsilnot = 8.85*10^-12;
dele = 11;
E = 1;
k11 = 9;
k33 = 9;
k22 = 11;
A = sqrt(dele*epsilnot*E^2/k11);
solinit=bvpinit(linspace(0,6),[0;pi/12])
sol=bvp4c(@fct,@bc,solinit)
figure(1)
plot(sol.x,sol.y(1,:))
function dxdy=fct(x,y)
dxdy=[y(2); -(A/2)*sin(2*y(1))];
end
function res=bc(ya,yb)
res=[ya(1);yb(1)-90]
end
end

カテゴリ

Help Center および File ExchangeChemistry についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by