38 views (last 30 days)

Hi there, I am currently trying to solve a two point boundary value problem for a system of 2 ordinary linear differential equation.

dx/dt=A(x/t)+By dy/dt=C(x/t^2)+D(y/t)

B.C y at 1=10 and y at 2=0

I have terrible matlab experience and knowledge.

This is my code so far (It doesnt work)

if true

% %Mechanical Properties of Material

E=200e9;

nu=0.3;

P=100E6;

%Constants A,B,C,D in the Equations

a11= (1/E);

a12= (-nu/E);

a33= (1/E);

A= (a12)/(a11+a12);

B= ((a33)-((2*a12^2)/(a11+a12)));

C= (a11)/(a11^2-a12^2);

D= (2*a12+a11)/(a11+a12);

%Defining the System of 2ODES

syms x(t) y(t)

t=1;

eqns = [diff(x,t)==A*(x/t)+B*y, diff(y,t)==-C*(x/t^2)-D*y];

cond = [y(0) == 0, y(1.2)==-P];

withSimplifications = dsolve(eqns, cond)

withoutSimplifications = dsolve(eqns, cond, 'IgnoreAnalyticConstraints', false)

[xSol(t), ySol(t)] = dsolve(eqns, cond)

end

Would anyone be able to give me any solutions to this problem?

Tamir Suliman
on 3 Dec 2016

You will have to differneitate then solve Since

x'=A(x/t)+By --- differnetiate A(x/t)+By for y relative to t

Y' = A*(x *-1/t^2 +1/t*x' ) + BY'

at t= 1 Y =10 at t =2 y = 0

(1-B)*C(x/t^2) + D (y/t) = A*(x *-1/t^2 +1/t*x' )

sub y =10 then solve for t =1 again sub y = 0 then solve for t =2

then use diff and dsvolve with t = 1 and t =2

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

Start Hunting!
## 6 Comments

## Direct link to this comment

https://ch.mathworks.com/matlabcentral/answers/315026-two-point-boundary-value-problem#comment_410749

⋮## Direct link to this comment

https://ch.mathworks.com/matlabcentral/answers/315026-two-point-boundary-value-problem#comment_410749

## Direct link to this comment

https://ch.mathworks.com/matlabcentral/answers/315026-two-point-boundary-value-problem#comment_410872

⋮## Direct link to this comment

https://ch.mathworks.com/matlabcentral/answers/315026-two-point-boundary-value-problem#comment_410872

## Direct link to this comment

https://ch.mathworks.com/matlabcentral/answers/315026-two-point-boundary-value-problem#comment_410883

⋮## Direct link to this comment

https://ch.mathworks.com/matlabcentral/answers/315026-two-point-boundary-value-problem#comment_410883

## Direct link to this comment

https://ch.mathworks.com/matlabcentral/answers/315026-two-point-boundary-value-problem#comment_410888

⋮## Direct link to this comment

https://ch.mathworks.com/matlabcentral/answers/315026-two-point-boundary-value-problem#comment_410888

## Direct link to this comment

https://ch.mathworks.com/matlabcentral/answers/315026-two-point-boundary-value-problem#comment_411107

⋮## Direct link to this comment

https://ch.mathworks.com/matlabcentral/answers/315026-two-point-boundary-value-problem#comment_411107

## Direct link to this comment

https://ch.mathworks.com/matlabcentral/answers/315026-two-point-boundary-value-problem#comment_411429

⋮## Direct link to this comment

https://ch.mathworks.com/matlabcentral/answers/315026-two-point-boundary-value-problem#comment_411429

Sign in to comment.